Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Microsoft.NETCore.App support netstandard1.6?

Tags:

.net

.net-core

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?

like image 989
Paleta Avatar asked Jul 02 '16 23:07

Paleta


1 Answers

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 on Microsoft.NetCore.App. type: platform tells NuGet that you are referencing a platform, which doesn't get installed as a package. netcoreapp1.0 imports netstandard1.6, which means it can use libraries that also target netstandard1.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 on NETStandard.Library or directly reference the NuGet packages you need.

like image 112
Nate Barbettini Avatar answered Oct 19 '22 04:10

Nate Barbettini