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 https://github.com/UnityContrib/framework/releases/tag/2015.10.04.1459
Here is the log file from Unity after I've copied the assemblies to Unity: Editor.log.txt
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?
Answer by robin-theilade · Nov 25, 2016 at 08:03 PM
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 https://issuetracker.unity3d.com/issues/plugins-dll-shouldnt-be-queried-by-isassemblycompatible-missing-isinternalorcompiledassembly-check
Answer by FatCatz · Nov 25, 2016 at 01:31 PM
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
Your answer
![](https://koobas.hobune.stream/wayback/20220612052123im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
assembly csharp error 0 Answers
PUN assembly conflict errors for UWP build specifically Hololens 2 0 Answers
My projects can't find each other in Visual Studio 0 Answers
Visual studio cannot find references to dlls from custom assembly definitions 2 Answers
How to get started with Azure Blobg Storage? (How to I add the correct namespace?) 1 Answer