All of a sudden when I try to attach to Unity 5.2 with Visual Studio 2015 I get a bunch of errors as seen in screenshot below. This is the second this has happened this week. Last time I had to create a new project and bring everything over to resolve the issue. Unity plays fine, no errors...but visual studio throws errors when I try to attach. It worked earlier this evening.
Asked
Active
Viewed 1,275 times
1
-
When these type of errors occur there is some in-compatibility with the `unity` and some of the `dll`'s you refer in the project.. Just try removing corresponding `dll`s and add it back.. Also clean the project and rebuild it and if possible just search what versions of the in-compatible `dll` can be used with the `unity`. – Guruprasad J Rao Dec 04 '15 at 04:20
-
Do you have all DLLs you project depends on in the plugins folder and are they all compiled to correct architecture for your editor? – ThisHandleNotInUse Dec 04 '15 at 05:06
2 Answers
1
Few things to consider when project shows error while being fully functional in Unity3D Editor itself:
- Can you build your project in
Visual Studio
even if errors are shown? If so, there is possiblity that these are just leftovers from Unity3D building your project - should disappear on first successful build from VS - If you can't build your project, have you tried to remove your
Library
folder from project's root folder? In many cases it will fix the problem but will end up in forcing Unity3D to rebuild some of the files it had previously inLibrary
folder. - Have you added any new libraries (
dll
's) to project? Any chance they might be installed/added in a wrong way? If so, try readding them to project (if it's a classicdll
) or readd plugin that you have troubles with.
I would leave version incompability as it would end up with errors in Unity3D console. Same with errors with solution per se.

mwilczynski
- 3,062
- 1
- 17
- 27
0
When I changed target framework to Unity 3.5 .net full Base Class Libraries the build errors went away.
I found the solution posted by Nathan Koop here: Type or namespace name does not exist

Community
- 1
- 1

James Grigley
- 83
- 1
- 8
-
I've found that it keeps on reverting to Unity 3.5 Base Class Libraries instead of Full base class. Not sure why. – James Grigley Dec 05 '15 at 03:52