Search Issue Tracker

Fixed in 4.5.3

Votes

167

Found in

4.3.0f4

Issue ID

568656

Regression

Yes

Double clicking a C# script will open MonoDevelop instead of Visual Studio

CodeEditors

-

Repro steps:
1. Set Visual Studio as your external code editor in Preferences and double click on a C# script.
2. A popup box saying "Starting Visual Studio" shows up, but then it disappears and MonoDevelop opens instead.

Update 2014-06-12 please go for this URL or a discussion of the fix for this bug in 4.5.1p1 and beyond: http://forum.unity3d.com/threads/double-clicking-a-c-script-should-open-visual-studio.251358/

Update 2014-08-01 A few remaining fixes for these Visual Studio launching problems have landed and will be available in 4.5.3p1. These fixes include:

* Additional retries when a new Visual Studio session is busy while Unity attempts to open a solution file or script file.
* New logging of information about the Visual Studio detection and launching process to the editor log.

Comments (64)

  1. Yotzee

    Jul 14, 2014 21:41

    I am still seeing this issue on 4.5.2f1 using VS2012 and Windows 8 (Surface Pro 2) - Does anyone have a fix for this. Is there a timeout on how long it takes VS to open and if it fails to open in that time then opens MonoDevelop... ?? Is there a way to change that...

    Tryed
    renaming executables.. Failed
    reinstalling and installing in different orders.. Failed
    restarting... Failed
    creating new project / new solutions... Failed

  2. XtraBigFish

    Jul 14, 2014 07:40

    I have Visual Studio 2008 installed along with Unity 4.5. I had the same problem whereas in my existing Unity project, after changing my external script editor tool to 'Visual Studio 2008' (from 'MonoDevelop'), Unity will try and launch Visual Studio 2008 but then launches MonoDevelop instead. There is workaround to this. It may or may not work for you but it worked for me.

    The problem:
    When you use MonoDevelop for your project for the first time, MonoDevelop creates two .sln files in your project root directory and they are not compatible with Visual Studio 2008. They may be compatible with later versions of Visual Studio. If you try double clicking one of the two .sln files, Visual Studio 2008 doesn't get launched.

    Solution:
    1. Create a new project, change preference to 'Visual Studio 2008' before creating / editing a script.
    2. For an existing project that used MonoDevelop in the past - first, manually launch Visual Studio 2008, create a new solution, and then add the existing {project name}-vs.csproj file that are located in the root directory of your Unity project. Save the solution and replace the both .sln files (you might want to rename the existing ones in case things goes wrong). I'm not sure which .sln file is associated to VS or MonoDevelop so I replaced both. You'll find that MonoDevelop will still be able to launch those Visual Studio 2008 .sln files.

    Hope this helps.

  3. DFT-Games

    Jul 13, 2014 16:36

    Version 4.5.2: still an issue, see case 608211.

  4. Neverfor

    Jun 22, 2014 19:56

    Update - apperantly, repairing VS2013 fixed the issue completely.

  5. Neverfor

    Jun 21, 2014 22:31

    I've got the same problem: first I used monodevelop (worked fine) but after I installed VS2013 it switched to it automatically. After that I wasn't able to start Monodevelop at all (using preferences >> External Tools). Now it went to VS2010 (also automatically after I installed MS SQL Server 2012) and does not want to use any library references, which is the biggest problem for me.

    Renaming file devenv.exe in VS2010 IDE map led to .cs files being opened in NotePad.... (Notepad!!!)
    Making a copy of devenv.exe from VS2013 map and placing it to the 2010 map led to VS2013 being loaded without any files opened in it.
    Navigating to another files through Browse menu or choosing other Script Editors from preferences does absolutely nothing. Its like it doesn't even work at all.

    The only way for me to work now is navigating to the project folder and opening solution with VS2013 manually. Anything else simply didn't fix it (I also tried the thingy with bat file).

  6. DavidGe

    Jun 13, 2014 22:47

    The problem started yesterday for me. After I did buy my pro license and installing 4.5.1f3.
    I was still using 4.3.4 until yesterday. I even am considering switching back to that version, because I really can't stand monodevelop. I am sure its a good editor, but I am used to VS2010 for my job.
    I hope the problem will be solved soon, so I can install the new version again.

  7. Dave-Hampson

    Jun 12, 2014 14:04

    Hi everyone, I have released a fix for this issue at least partially in version 4.5.1p1 (NB, p1 not f1) which should be available in the next few days. It is *not* fixed in 4.5.1 / 4.5.1f1. Please visit http://forum.unity3d.com/threads/double-clicking-a-c-script-should-open-visual-studio.251358/ and let me know if it looks fixed for you in the attached poll.

  8. Skyblade

    Jun 11, 2014 12:24

    I have VS 2012 and MonoDevelop. Monodevelop fails to load *.csproj file, so I changed it to VS 2012, but instead of it Unity launches 2010 Shell(!), which says "Invalid license" and after that Unity freezes forever.

  9. mdrotar

    May 27, 2014 01:29

    So, in my case, the problem started after I installed an update to VS2010. Today I installed an update for VS2013 and now it Unity opens VS2013 properly again. I have no idea what the underlying issue was but it seems to be fixed for me now. I hope it stays that way.

  10. VicToMeyeZR

    May 26, 2014 13:14

    It seems to depend on how long VS is taking to open. If VS is open already, it works properly for me, but if not, occasionally it will open MonoDevelop instead

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.