Problem compiling for Unity 5.3 with Visual Studio 2015

Up until now I’ve been able to write code and compile using Visual Studio and then copy the assemblies to the Unity project. However after updating to Unity 5.3 this no longer works for me.

Now when I use a Visual Studio compiled assembly in Unity I’m getting quite a few error log entries like this

'Assets/UnityContrib/Assemblies/UnityContrib.UnityEngine.dll' shouldn't be queried by IsAssemblyCompatible, missing IsInternalOrCompiledAssembly check ?
 
(Filename: C:/buildslave/unity/build/Editor/Src/AssetPipeline/MonoCompilationPipeline.cpp Line: 940)

I have not changed anything in the assembly itself.

This is the assembly Release UnityContrib.2015.10.04.1459 · UnityContrib/framework · GitHub

Here is the log file from Unity after I’ve copied the assemblies to Unity: [59737-editorlog.txt|59737]

I’ve tried the following target frameworks, without luck:

  • .NET Framework 3.5
  • .NET Framework 4.0
  • Unity 3.5 .net full Base Class Libraries
  • Unity 3.5 .net subset Base Class Libraries

Any ideas on how to continue to use Visual Studio as compiler?

I ran into the same exact problem. It was driving me nuts because my initial test run with a HelloWorld class worked. The solution for me was to give each assembly a name other then the default Assembly-CSharp and Assembly-CSharp-Editor. I also gave a default namespace that matched my class files…it was original blank.

Note I continued to use the Unity 3.5 .net Subset Base Class Libraries

Totally forgot asking this question. Here is the answer that applied to my case though. Unity engine didn’t handle assembles named Something.UnityEngine.dll correctly back in version 5.3. It was fixed in 5.3.1.

Refer to this issue for more information