Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
721 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...