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.
system
3
+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”
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.
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.