The latest version of unity says, that it supports .NET Framework 4.6. However, when I try to compile my C# files which use some of the new class libraries, like System.Net.Http, it doesn’t recognize those and doesn’t give me an option to add those namespaces. What is going on ? In the .csproj file, the framework version seems to be correctly set to 4.6. And I have also change the .NET Framework version to 4.6 in Player project settings.
In order for Unity 2017 to have .NET 4.6 support, you have to enable it manually in the Player Settings with the following settings. Set both Scripting Runtime Version
and Api Compatibility Level
to .NET 4.6 like so: