NET Standard library refer .NETCore

2019-09-14 16:14发布

问题:

I am new to the Microsoft Core world and wanted create a class library that targets the .NET standard. I was using the Visual Studio IDE 2017 and picked a class library project template listed under .NET Standard.

When I expand the SDK on the .NET standard project structure, I could see Microsoft.NETCore.Platform 1.1.0 as reference.

As per my understanding, .NET Core, .NET Framework, Mono, Universal Windows Platform, etc. uses .NET Standard and not other-way around. Please correct me.

Question:

  1. What is the relevance of Microsoft.NETCore.Platform 1.1.0 reference under SDK?

回答1:

Clearly it is used for the following purposes,

Provides runtime information required to resolve target framework, platform, and runtime specific implementations of .NETCore packages.

https://www.nuget.org/packages/Microsoft.NETCore.Platforms/

and more can be found if you check the source code,

https://github.com/dotnet/corefx/blob/c2588415e91ca1d44885ac0bbe9bf8268adc4b48/pkg/Microsoft.NETCore.Platforms/readme.md

It is a cross platform package, not bind to any specific platform, but with a wrong name. As you asked, "NETCore" part is confusing and should be removed.