I’m adding a .NET Standard 1.3 DLL to my Unity project under the experimental .NET 4.6 profile. The DLL seems to work fine in general, but when I try to reference an enum defined in that netstandard DLL, I get the following error:
error CS0012: The type System.Enum' is defined in an assembly that is not referenced. Consider adding a reference to assembly System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
Manually adding the given reference to the C# project (as described here) allows me to build fine in Visual Studio, but this is presumably clobbered each time by the Unity project generation and the editor won’t let me proceed.
Unity doesn’t support any version of .Net Standard in 2017.1. We’re working now on adding support for .Net Standard 2.0 and earlier, but it is not ready for release just yet.
Okay, thanks for the clarification! I had thought .NET 4.6 would include support for netstandard 1.3, but I’ll wait for the 2.0 support when it arrives. Is this something for 2017.2 or is it a longer timeframe?
Just FYI, if you grab the System.Runtime.dll from Nuget, and your package is .NET Standard 1.3 or lower, it’s probable that things will work as long as you get all the packages from Nuget and throw them in there. I know for a fact that I am using a few .NET Standard 1.0 and .NET Standard 1.1 only dependencies in my library and they load just fine. My overall library is .NET Standard 1.4, though, so it fails (because it requires 4.6.1)