This is a work in progress and will change as we fix bugs in the product to improve the porting user experience. The target auidence for this is package authors. It assumes that you have built and pubished a nuget package before.
First read the uber document for background.
TL;DR, it's the next step in the Portable Class Libraries ecosystem.
- I already have a PCL csproj and I want to move to netstandard.
- I'm starting from scratch and I want to support netstandard. OR I'm willing to change my current project system and build to use the new xproj project system.
- I'm migrating an RC1 DNX project to an RC2 .NET CLI project.
- I'm starting from my .NET Framework library and I want to go to netstandard.
- There are no packages that exist with the netstandard target framework. This is because we it was created only a few months ago. This means that you may need to use a new feature called
project.json
imports to bypass the NuGet compatiblity check when pulling in other packages as dependencies (see the compatiblity section of this document for more information). - There are 2 NuGet experiences,
packages.config
andproject.json
. Most projects supportpackages.config
today but NuGet is pushing people towardsproject.json
. This is not the default experience in any other project except Windows Universal Applications and .NET Core projects. - This process only works with the latest Visual Studio. It means when you convert your project, you'll only be able to use it in Visual Studio 2015.
- It's possible to author packages that work in Visual Studio 2012 - 2015 but the NuGet client on 2012 and 2013 does not currently support the netstandard moniker. This doesn't mean things won't work, it just means you'll also need to include another dll in the package. The NuGet team is looking at down level support for this moniker.
- Windows Universal platform applications do not yet work with RC2 packages, this means a nuget package that wants to target all platforms, you'll need to have a different set of dependencies in your nuspec/project.json for
netcore50
. - If you need to target multiple frameworks there are 2 approaches:
- Use
.xproj
+project.json
. This is a single project that can target multiple frameworks. - Use multiple
.csproj
files with different references
Everything 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.
- Visual Studio 2015 Update 2
- Make sure you have the latest version of NuGet >= 3.4
- NuGet.exe 3.4.2-rc