I installed VS2012 first, and successfully intergrated Unity with VS2012 (by selecting devenv.exe path). After that, for some reasons, I installed VS2010. Now I can only open Unity scripts in VS2010, even if in Preference, I selected VS2012 devenv.exe path, and the preferences dialog show I have selected VS2012.
I have Visual Studio 2013 installed, and after installing SQL Server 2014 with Tools, Unity had problems with starting VS2013 as shell for project editing with infamous “Invalid license data. Reinstall is required.” popup
After getting frustrated Nth time, and hours spent on internet in search for answers, and finally getting it traced with friendly Process Monitor it came up to this:
Unity (or something inside it, I don’t know, may be some COM object), when it attempts to start a handler for the Visual Studio, traces all the versions of VS from lower versions up in registry keys HKCR\VisualStudio.DTE.xx.0 in order to figure out what handler to run. I went to my registry and just disabled VisualStudio.DTE.10.0 entry by renaming it to “VisualStudio.DTE.10.0 disabled” and everything magically works now.
(vs2010 was not a full version of Visual studio anyway in my case - it came with SQL Server 2014 as Management Console replacement and screwing things ever since it got installed.)
(I originally posted it here but it looks like this question is also fits for my findings)
I have the same problem. I installed the VS2010 shell and now when I click on C# scripts in Unity it opens 2010 and says that I don’t have the registration key. Then opens MonoDev.
I also have VS2012.
I am having the exact same problem… Since Unity did not show Visual Studio 2012 in the list I pointed it towards the devenv.exe, but it always opens a Visual Studio 2010 shell saying “Invalid license data. Reinstall is required.”
The way I “solved” it was by going to the Unity project folder and manually opening the .csproj file.
This contains all the information of the C# project and will register changes as you add scripts in Unity.
So this way I just keep VS2012 and Unity open at the same time…
Just make sure not to alter the project settings in VS2012, as I am not sure what consequences that would have in Unity.
I also had the same problem. For me it was fixed by installing the Visual Studio Unity tools (http://unityvs.com/), and then importing the required assets to my project (Assets → Import Package → Visual Studio 20xx Tools).
Then in the drop down select browse and navigate to the devenv.exe you want it to run. I just did this with VS2017 and it picked it up fine after showing it where the file is.
Before it was loading that stupid 2010 thing ;(
Great work, I'll give this a shot.
– nathan_taylorThanks! The only solution that worked
– Tseng