UPDATE: Since people keep posting here to bring the post back up to the top:
the problems in the original post were all gone for me some time during 2016.
This might’ve been a fluke, but in case it’s consistent, I’ll post this:
Upgrading to Unity 5.2 broke VS Tools for Unity for me - VS tools was unselectable in the External Script Editor drop-down, and opening any script caused MonoDevelop to open and promptly fail to load anything if “normal” visual studio was selected.
All of this was fixed by simply deleting the VS tools folder from the Assets folder of the project. It seems like having both the new built-in VS tools and the old .dll causes both of them to fail hard.
Big props to the dev team for adding VS tools as a standard feature in Unity.
EDIT: As you can see by following this thread, the UnityVS integration isn’t quite there. There are some instances where integration used to work in 5.1 + UnityVS, where it doesn’t work anymore. The known problems are:
Users of the Resharper plugin cannot open scripts from Unity without first opening Visual Studio manually
Mac users running Visual Studio on a VM doesn’t have working integration
It may seem like other plugins can also cause the integration to fail.
Sadly, better integration is, in fact, broken integration.
Back to waiting forever for Visual Studio to open, failing, and Mono Develop launching.
Using Visual Studio 2015 Community, VSTools 2.1, and Unity 5.2.
Rolling back to to 5.1.3f1
@FuguFirecracker Hey, sorry to hear it’s giving you trouble. Any chance you could send me editor log file for when it was unable to get VS2015 Community to open?
In the about window, (Help->About) did it in the left bottom mention VSTU tools?
Lucas - which about window (Unity or Visual Studio) is meant to mention the VSTU tools?
I have a different issue. I have 2013 installed, but it was a bit flakey with debugging. So I thought I’d install 5.2 with the VS 2015 Community Edition. Unity kept 2013 as my default, so I manually changed the external tools option to 2015 CE. That opens fine, including the Unity Scripting API reference page. But how on earth do I start debugging my app? Attaching to the Unity process doesn’t work…
Up until 5.1.3 double clicking a file (or error message in a file) opened the file in Visual Studio 2015
Now in 5.2 it insist on starting a new Visual Studio instance which takes 20+ seconds
@AnonnyMoose inside Unity, in the Help->About window, in the left bottom, it should say something like “Visual Studio Tools for Unity loaded with a version number”. If it doesn’t say that, then the problem is that for some reason Unity didn’t open the VSTU “plugin” that is now installed with VSTU instead of imported in your project.
@Hyp-X : Are you saying that if you click three different files, Unity will try to open 3 different VisualStudio’s for you? Could you let me know what your about window (help->about in unity) says in the left bottom?
I’m running Unity on a Mac and Visual Studio 2015 trough VMware. Before 5.2 I was able to use this setup perfectly with the VSTU unitypackage, but now with 5.2 I am having trouble to get Unity to see if VSTU is installed so it doesn’t generate the correct project files. I’ve added Visual Studio as a External Editor trough the browse function. Double clicking a file will open the file in Visual Studio but it won’t load the project. Using “Open C# Project” opens MonoDevelop and Visual Studio but it can’t resolve anything from the Unity API.
I’ve reinstalled Visual Studio 2015 community and VSTU 2.1 but it still doesn’t work.
Edit: I’ve noticed that the Visual Studio app I can add trough the “Browse…” function is an app generated by VMware and acts as an shortcut. So I tried to add the EXE directly by sharing the Visual Studio folder but I can’t, as expected, add the EXE. I think there should be an option for Mac users to force generate the correct project files that work nicely with VSTU.
I got a related problem… I installed Unity 5.2 (and selected Visual Studio 2015 Community for installation aswell), but the aboutbox in unity does not show the VSTU line.
I can see that VSTU is installed and I have selected VS 2015 as editor in Unity.
I’m the same as Maxi77. No VSTU in the about box, but it does have the option “Assets->Open C# Project” which opens Visual Studio. I just can’t debug at all.
For folks with troubles setting up VSTU 2.1 and Unity 5.2, we had a pretty simple doc for you, make sure you go through the checklist at the end:
For folks with Unity on OSX and VS in a VM, that’s not a scenario we officially support so it may or may not work currently. Unity on OSX still requires the VSTU package to be imported to generate the projects files to be opened in VS in a VM. We never supported opening scripts in VS accross a VM I’m afraid.
Install Visual Studio and the Visual Studio Tools for Unity. Check
In Unity, delete the UnityVS folder if you were previously working with VSTU in an older Unity. Did not use VSTU before.
In Unity, set Visual Studio to be the external script editor. Check
In Unity, check that the native VSTU support is enabled in the About Unity window. Nope???
Clicking on a script in unity does open VS.
I do have the option to debug unity project in VS.
I do have the unity reference manual link in VS help menu.
It looks like im missing the rest of the integration features.
I assume you have installed the latest VSTU which is 2.1.
I assume you have installed VSTU for the same version as your Visual Studio. (VSTU 2015 for VS 2015 for instance). Let’s assume you’re on 2015.
VSTU should have installed the file SyntaxTree.VisualStudio.Unity.Bridge.dll in the folder: C:\Program Files (x86)\Microsoft Visual Studio Tools for Unity\2015\Editor
VSTU should have written the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft Visual Studio 2015 Tools for Unity with a value being the full path to the dll just mentionned.
In the external tools in Unity, I assume you selected the proper Visual Studio version, say 2015.
The registry key is basically what Unity uses to find and load VSTU for the selected VS version.
And the bug is back. I thought I had it working yesterday, but a restard brought it back.
@jbevain , all of those are the case for me. Unity 5.2’s still opening MonoDevelop. I uninstalled Unity, and deleted the Vs tools folder. Then I reinstalled Unity and included the VS tools in the install. Whenever I open a script, it shows me the good old “Starting up Visual Studio, this might take a few seconds”, before opening MonoDevelop.
The Vs tools menu option that used to exist is gone now. Is the need to manually generate the VS tools project files gone? Might this be happening because I still have them in my project?
I know that when Unity fails to open a script in the external editor set in preferences, it falls back to MonoDevelop. Is there anywhere I can check to see what’s going wrong when it tried to open VS?
Ok, problem solved it was a confusion between the old and new name of the solution file.
Even though I deleted the old solution and project files (UnityVS* named), I was somehow able to open it from VS2015 recents.
(It only opened one more VS because the open solution was different.)