I was using another version of Unity 5. I think 5.1. The one where you have a folder called UnityVS to debug using VS. I’ve just updated the project with the new Unity version, however I can no longer debug using VS.
I deleted the UnityVS folder as some other threads suggested, but it still does not work :S. I have Visual Studio 2015 Community edition.
The error popping up is:
"a project with an output type of class library cannot be started directly.
In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project."
Due to my green-ness with Visual Studio, I’m not quite sure how to fix this issue.
It’s just repairing the VSTU installation. If that doesn’t work, manually move the VSTU package in the “Program Files (x86) / Unity / Editor / Standard Assets” and move it to the x64 equivalent.
Source: Had same issue on lab computers. Made this change to fix it.
Firstly make sure you have this downloaded https://visualstudiogallery.msdn.microsoft.com/20b80b8c-659b-45ef-96c1-437828fe7cf2 (whatever’s the right version), make sure there isn’t a UnityVS folder in your asset directory. Lastly go to the ‘Help’ option at the top of Unity and click on ‘About Unity…’, that’ll have some text on the bottom left mentioning it recognises the Visual Studio tools you’ve downloaded.
Also on the link read through the link in this bit: Unity 5.2 users, read our documentation about Unity’s native support for VSTU.
This also did the trick for me, thank you! The cause in my case was that I had moved my Unity project to a different location, this seemed to resolve the path issues VS had.