- Home /
Unity Pro won't default to Visual Studio full edition
I am using Unity 3.4 Pro and Visual Studio 2010 (full version, not express) at my job. I have set the default editor to Visual Studio 2010 in my Unity preferences. When I 'sync Monodevelop project' I get the the progress bar that says "Starting up Visual Studio..." So I double click one of my C# scripts and I again get the "Starting up Visual Studio..." popup, but then Monodevelop opens instead. I have tried uninstalling and reinstalling Unity with and without Monodevelop and I get this every time. My coworkers don't seem to be having this issue, but they've all looked over my setup and can't see anything wrong.
Is anyone else out there encountering this?? My searches have been fruitless...
I am also having this exact issue (with free version). I also have unity installed on my laptop, using the same version of VS2010 Prof. It works fine. $$anonymous$$y desktop however, always defaults to $$anonymous$$ono, no matter how many times I select VS2010 as default, and restart Unity.
Answer by davebuchhofer · Oct 18, 2011 at 02:21 PM
dbuck: So, unity wont open visual studio for me anymore, theres a small window that says 'opening visual studio' and then monodevelop opens, and a dead devenv.exe ends up in the task manager, has anyone else run into this?
support: dbuck: does your vs2010 install path include "Microsoft Visual Studio 10.0" ?
support: one sec
(I was in the middle of repairing the install, just in case it was the Visual Assist trial that i had uninstalled causing the problem)
support: Set your default script editor to VS2010
support: close MD, VS, and Unity
support: delete all .sln and .csproj from your project folder
support: start Unity
support: Choose "Sync MonoDevelop Project" from the Assets menu
support: dbuck: this happens when VS returns a failure status when opening the script project
support: this can be when: it needs to pop up some nagware dialog (resharper trial, etc.), the solution has been generated for a different version of VS, VS actually fails
(I'm STILL in the middle of repairing the install, so once it finishes i'll edit whether the answer is correct! but, this was a talk with the guy who did the monodevelop integration!)
I'm not sure what is meant by vs2010 install path... is that just where it is located in my program files directory? If so, $$anonymous$$e is C:\Program Files (x86)\$$anonymous$$icrosoft Visual Studio 10.0. I tried the rest of the steps and $$anonymous$$D still opened with dead devenv in task manager. Each attempt stacks another devenv in the processes.
Did it eventually work for you?
That did it for me (deleting old project files). Can't upvote but thanks!
@Botz3000: If it worked for you, I'll upvote it in your place.
Answer by RogueDeus · Sep 21, 2011 at 01:05 AM
This fixed it for me... FINELY.
Dunno if its the newest version or the way I did this. Either way it worked and I hope it helps you guys.
First, I used the VS2010 DVD to do a complete uninstall of VS2010.
Second, I uninstalled Unity3D.
Third, rebooted PC.
Fourth, reinstalled VS2010 to DEFAULT install location. C:/ etc...
Fifth, patched VS2010, and restarted PC.
Sixth, Installed Unity3D 3.4.1 to its DEFAULT install location.
Seventh, started Unity3D, selected VS2010 from preferences. Killed Unity.
Eighth, re-started Unity3D, double clicked c# script, and BINGO!!
It built the Unity VS2010 solution and started VS2010 as though there was never an issue.
Hope it works for you.
Unfortunately, no. I followed your steps but mono opens every time. I might try again at some point, but it took nearly 2 hours to uninstall/reinstall everything (VS web install).
Damn that sucks. $$anonymous$$aybe it has to do with me using the DVD to uninstall and re-install. Also I had first installed VS and Unity to my X: drive (when the trouble existed). When I reinstalled, I let them choose their default location (On my C: drive). Hope you eventually get this resolved.
Answer by RogueDeus · Aug 23, 2011 at 10:03 PM
In Unity forums: http://forum.unity3d.com/threads/99625-After-upgrading-to-Unity-3.4.0f5-double-clicking-Console-window-won-t-open-VS-2008
Apparently its been reported as a bug. Whether its getting fixed... Who knows. I reported it as a bug in Unity toolset report feature as well.
Yes, I ended up submitting a bug report as well. What I don't get is that my coworkers have the same exact set-up as I do - same computer build, same OS, same software. For whatever reason I'm the lucky one, I guess.
In the meantime, I can usually open the project in VS by itself alongside Unity and just manually open the scripts I need.
Looks like this isn't very important. I have received no word at all...
I think what's happening is that sometimes Unity doesn't properly sync the project. When this occurs, VS cannot open it and so $$anonymous$$onodevelop opens ins$$anonymous$$d. I've also noticed that sometimes VS does open, but then immediately closes before I can even click over to it. Furthermore, there have been times when I've tried to open the project outside of Unity and VS says that it can't open the solution because it is the wrong version (??) Re-syncing the project in Unity seems to fix that, but still will not allow me to open VS itself from within Unity.
At this point, I've given up expecting it to work 'properly' and am hoping that perhaps the 3.5 update will fix it when it comes out (although the 3.3 to 3.4 update did not...)
I feel your pain. The primary reason I purchased VS2010 Pro was to use it with Unity! /grumble
$$anonymous$$onoDevelop feels so clunky compared to VS... But I suppose its a matter of taste.
But I digress. I too have tried everything I can think of. I even tried to mess with my Laptop (which is working fine with VS) to try and get it to do the same thing as my Desktop and see what caused it. But nope... No matter what I do, it always works on the one and not the other... :(
3.4.1 lists "Editor, Runtime and $$anonymous$$onoDevelop fixes" for the version bump... Installing now. Hope it fixes this!!
Answer by DavidButtress · Sep 06, 2011 at 07:32 PM
I'm having this same issue. I found that leaving renaming the monodevelop.exe file (C:\Program Files (x86)\Unity\MonoDevelop\bin\monodevelop.exe) so that Unity can't find it worked sometimes, but is still temperamental, but then you can't use it for debugging scripts also. Some combination of using sync project, opening scripts from unity, and opening the project .sln file manually seems to get it to work.
There are definitely some bugs in the system, I've been trying to figure it out by watching the processes opening with Process Explorer, and it seems that every time you double click a script it opens a new instance of devenv.exe with an -Embedded argument, each using ~80mb memory. It would be interesting to see if this also happens on machines where it is 'working'.
Well hell. So long as Unity cant grab $$anonymous$$ono it opens VS2010 just fine. Thanks for pointing that out. It is probably the ONE thing I had not tried yet, for some odd reason. Thanks! Edit: However it does seem that intellisense does not work correctly for unity script as it does in mono.
On second look its not working as it should when I disable mono... it will open the .cs file in VS2010 but it wont recognize the .sln file. In order to make it see the .sln I have to manually open it in VS every time. So while disabling mono does get VS to start, its still necessary to do the manual work around in order for the .sln and thus unity script intellisense to work.
I've played around some more and I found that it seems to randomly 'connect' to VS sometimes, whether you're disabled monodev or not. If I repeated double click on the same script in unity, then close monodev if it opens (it does most of the time), after a while (10 goes?) VS studio popped up and started working, once it was up every other script I tried worked straight away. Seems a bit like there could be a time out when trying to load VS, and then falls back to monodev. But if you keep trying then it manages to load it. I have noticed that sometimes it just loads the .cs file up without a proper connection to the .sln too.
I've also had just the .cs open without the .sln. I'm pretty sure that I've tried everything (including deleting/rena$$anonymous$$g the monodevelop exe), my coworkers even had me look in the registry for any errant keys that might have been pointing to $$anonymous$$onodevelop, but everything was set to VS.
The $$anonymous$$Buttress solution worked for me. None of the other recommendations did.
Seriously, if you just keep clicking furiously on your scripts in the editor, eventually it will open in visual studio. It will open in monodevelop a few times before that. Just keep clicking.
It's pretty stupid but it works.
Definitely don't rename your monodevelop exe. It will open the script but not associate it with the sln. Pointless.
Answer by Zniper69 · Jun 21, 2012 at 02:59 PM
I had the same issue as described in the top post, and got a solution from "ToreTank" on #unity3d @ freenode..
The problem seems to be that VS is too slow when it comes to starting up, and Unity recognizes this as a problem and makes some kind of fallback, and opens MonoDev instead. All I had to do was rename the MonoDev application so that unity cannot find it. This made it impossible for unity to make that fallback resulting in VS getting enough time to actually start up.
Back when I first encountered this issue I tried hiding $$anonymous$$onoDevelop from Unity by rena$$anonymous$$g it - what happened ins$$anonymous$$d was that the script simply did not open at all. So I completely removed $$anonymous$$ono from my system by re-installing Unity without it, yielding the same results.
I have since changed studios and no longer use that computer, so this issue will forever go unresolved for me. I hope I don't encounter it again. I am glad that some people have seemed to find solutions here, it is more that I had to go on.