Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
744 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...