I'm trying to get started with .NET Core and I'm really having some headaches to understand all this new naming scheme.
Looking at the wiki netcoreapp1.0
targets the .NET Standard Library 1.6, however when I try to add the netstandard1.6
instead of netcoreapp1.0
I get a package restore failed because Microsoft.NetCore.App does not support netstandard1.6
.
Is it because is delcared like this?
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
Also, what does type "platform" means?
What you use and reference depends on whether you are building an application, or a shared library:
If you are building an application (console, UWP, ASP.NET Core web app), you'll target
netcoreapp1.0
and depend onMicrosoft.NetCore.App
.type: platform
tells NuGet that you are referencing a platform, which doesn't get installed as a package.netcoreapp1.0
importsnetstandard1.6
, which means it can use libraries that also targetnetstandard1.6
or below.If you are building a library (to be consumed by another library or application), you'll target
netstandard1.X
and either depend onNETStandard.Library
or directly reference the NuGet packages you need.