When I compile the default C# script for Unity 5.6 in Visual Studio 2015 or 2017, I get warnings that the references for nunit.framework and UnityEngine.TestRunner couldn’t be resolved because they both have an indirect dependency on a System.Web assembly that’s not available in .NET 3.5, the default targeted framework for Unity 5.6 projects. The nunit.framework and UnityEngine.TestRunner assemblies were installed with Unity 5.6, and the references are added by default in new Unity 5.6 C# solutions (in both Visual Studio and MonoDevelop).
Interestingly, these warning don’t appear in MonoDevelop, so I understand that one solution would be “don’t use Visual Studio, use MonoDevelop”, but I need some of the higher-end Visual Studio capabilities that aren’t available in MonoDevelop.
I’m actually getting ready to start exploring using NUnit and the Unity test runner to test my games, so removing those references from my Visual Studio project to get rid of the warnings isn’t an option either.
Any suggestions on how to resolve this?