This isn’t too urgent, but I’m trying to get Unity to work in VS2012. I go into Edit->Preferences and set my external script editor to VS2012. However, when I double click on scripts, they still open in VS2010. I tried restarting Unity and clearing out the generates vs project files in my project folder, but no dice. As a test, I’m able to switch back to VS2008 just fine, but it just keeps opening in VS2010 whenever I set it to VS2012. I can open up the solution file in VS2012 just fine when I open it from the file explorer (and indeed, 2012 is the default VS version when I do so), but my workflow is usually double clicking on my scrips in Unity, and when I do so, I get VS2010. Any ideas?
UPDATE:
Well, I didn’t find a GOOD solution for this, but I have something. I uninstalled VS2010. Then, even though I had VS2012 as my default editor, Unity was opening my files in MonoDevelop. So I messed with its link to MonoDevelop (I renamed the executable MonoDevelop1.exe) and voila, I can work in 2012! I wish I actually knew what was going on, but oh well.
UPDATE2:
One annoying this is that, while I am now able to open things in VS2012, Unity compile errors/notifies don’t go to the correct line in a file when I double click them. Bleh, I’m fighting an uphill battle. Really, I just thought Unity looked nice side by side with VS2012’s dark color scheme >_>
I had the same problem. The only way to get it to work is to uninstall unity. Then delete the unity folders from the program files and program data folders. Then you have to go into the registry (regedit) and go to current user → software → unity technologies → unity editor 4.x; then delete any "RecentlyUsedScriptApp that references and version of visual studio. Also there may be external tool keys register with references to all the versions of visual studio. Then restart and reinstall Unity. Then when you go into external tools there should only be an option for monodevelope, then you can add vs 2012 and select it as the default and it should work fine.
P.S. BE VERY CAREFUL OF WHAT YOU DELETE IN THE REGISTRY!!!
I finally got VS2013 to work as my default editor in every way. If I click on an error, it opens to the correct line in VS.
My solution was the following:
Use Revo Uninstaller to completely remove Unity and VS2013.I know, it’s tedious. If you have Unity Pro, you might want to return your license first (Help>Manage License). In Revo, I used the Advanced mode to uninstall both. I deleted every registry file it found for both programs, and deleted all the leftover folders. Basically I got rid of everything related to either Unity or Vs.
I think something about the Install order actually makes a big difference. For me, (and most people I’ve talked to with this problem), I already had VS installed when we installed Unity, which may have caused the problems.
I’m curious to know if this works for anyone else.
Original post:
I’ve had the same issue with vs2013. In the past, I found that there was some crazy combination of the following operations which made it work…
-Open the unity script project (.sln) directly from VS2012 and hit save all.
-In Unity, click Assets/Sync MonoDevelop project
-Make sure that VS2012 is set as the editor in the unity settings.
-In windows explorer, right click on a .cs file and make sure it’s set to always open with VS2012.
-Delete the .sln file (unity will automatically recreate it)
Of course, I’ve never figured out the correct sequence to those steps, but usually after I’ve spent a few hours doing those things over and over, it magically works. The registry solution might be better.