A repository that describes the .NET Standard
This is a work in progress and will change as we fix bugs in the product to improve the porting user experience. The target audience for this is package authors. It assumes that you have built and published a NuGet package before.
Netstandard is the next step after Portable Class Libraries. Please read the full Netstandard document for more information.
Moving to Netstandard is the way to go, going forward, to maximize reusability of your code. Here are a few situations you may find yourself in:
| Target Platform Name | Alias | | | | | | | | :---------- | :--------- |:--------- |:--------- |:--------- |:--------- |:--------- |:--------- | |.NET Platform Standard | netstandard | 1.0 | 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | |.NET Core|netcoreapp|→|→|→|→|→|1.0| |.NET Framework|net|→|→|→|→|→|4.6.2| |||→|→|→|→|4.6.1|| |||→|→|→|4.6||| |||→|→|4.5.2|||| |||→|→|4.5.1|||| |||→|4.5||||| |Universal Windows Platform|uap|→|→|→|→|10.0|| |Windows|win|→|→|8.1|||| |||→|8.0||||| |Windows Phone|wpa|→|→|8.1|||| |Windows Phone Silverlight|wp|8.1|||||| |||8.0|||||| |Mono/Xamarin Platforms||→|→|→|→|→|| |Mono||→|→||||||
netstandardtarget framework, because it was only recently created. This means that you may need to use a new feature called
project.jsonimports to bypass the NuGet compatiblity check when pulling in other packages as dependencies (see the compatiblity section of this document for more information).
project.json. Most projects support
packages.configtoday but NuGet is pushing people towards
project.json. This is not the default experience in any other project except Windows Universal Applications and .NET Core projects.
project.json. This is a single project that can target multiple frameworks.
.csprojfiles with different references
Everything in Netstandard is represented as packages. The biggest benefit to this is that it no longer requires an installed SDK or Visual Studio to compile for a specific target framework. This is also beneficial for cross platform builds since the only thing you need is the .NET CLI tool chain.