- Home /
Getting Unresolved Reference Warnings After Unity Update (To 5.3.4f1 64-bit)
After updating to Unity 5.3.4f1 (64-bit), I am receiving three similar warnings:
"The primary reference "UnityEditor" could not be resolved because it has an indirect dependency on the framework assembly "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5,Profile=Unity Web v3.5". To resolve this problem, either remove the reference "UnityEditor" or retarget your application to a framework version which contains "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". GameProject.CSharp"
..and two similar Warnings that is almost identical but with "UnityEngine.Networking" and "UnityEngine.UI" instead of the above "UnityEditor" (in bold).
From the two solutions listed in the warning, I don't want to remove the references as I might need it in the future. In regards to re-targeting my application, from what I understand, we can only choose between ".NET 2.0" and ".NET 2.0 Subset" from Unity > Edit > Project Settings > Player > Api Compatibility Level, but choosing either did not eliminate the warnings.
Seeing that there are only .NET Framework 4.5 and later versions installed in my Windows OS, I wondered if I needed .NET Framework 3.5 installed specifically on my OS.
I proceeded to "turn on a feature" for .NET Framework 3.5 in Windows > Control Panel > Windows Features. Then I restarted my computer, just to be certain.
This has proved to be ineffective in solving the warnings.
Answer by OperationT · Apr 14, 2016 at 05:11 AM
Setting the Api Compatibility Level from ".NET 2.0 Subset" to ".NET 2.0" does indeed solve the warning, but only after restarting Unity3D and/or Visual Studio is required (I restarted both, so I don't know which one). After restarting Visual Studio, it'll prompt you to reload scripts that have been changed outside of Visual Studio. After reloading, the warnings are gone.
I have confirmed this through reproducing and re-resolving the warning a couple of times.
Answer by · Jun 18, 2016 at 05:46 AM
+1. This solution also worked for me. Error appeared in update to 5.3.5f. To summarize solution:
Change Setting:
Unity > Edit > Project Settings > Player > Api Compatibility Level
From:
".NET 2.0 Subset"
To
".NET 2.0"
Thanks, had the same problem. I did have to switch my build platform from Web to PC before the Api Compatibility Level option showed. Also you don't even need to restart Unity nor Visual Studio for this to take effect. Just click 'okay' for the visual studio reload popup.
Answer by ThomLaurent · Feb 24, 2017 at 12:34 PM
For me it was due to the default platform I was building on. Changing it from Web Player
to PC, Mac & Linux Standalone
in File > Build Settings... (+ hit Switch Plateform) worked.