首页 > 代码库 > Introducing .NET Standard
Introducing .NET Standard
https://blogs.msdn.microsoft.com/dotnet/2016/10/18/the-week-in-net-bond-the-gallery/
.NET Standard solves the code sharing problem for .NET developers across all platforms by bringing all the APIs that you expect and love across the environments that you need: desktop applications, mobile apps & games, and cloud services:
- .NET Standard is a set of APIs that all .NET platforms have to implement. This unifies the .NET platforms and prevents future fragmentation.
- .NET Standard 2.0 will be implemented by .NET Framework, .NET Core, and Xamarin. For .NET Core, this will add many of the existing APIsthat have been requested.
- .NET Standard 2.0 includes a compatibility shim for .NET Framework binaries, significantly increasing the set of libraries that you can reference from your .NET Standard libraries.
- .NET Standard will replace Portable Class Libraries (PCLs) as the tooling story for building multi-platform .NET libraries.
- You can see the .NET Standard API definition in the dotnet/standard repo on GitHub.
.net跨平台带来的问题就是,基础类库无法通用
.NET Standard library因此诞生
To summarize, we need .NET Standard for two reasons:
- Driving force for consistency. We want to have an agreed upon set of required APIs that all .NET platforms have to implement in order to gain access to the .NET library ecosystem.
- Foundation for great cross-platform tooling. We want a simplified tooling experience that allows you to target the commonality of all .NET platforms by choosing a single version number.
From a library targeting .NET Standard you’ll be able to reference two kinds of other libraries:(以后只需引用两种类型的库)
- .NET Standard, if their version is lower or equal to the version you’re targeting.
- Portable Class Libraries, if their profile can be mapped to a .NET Standard version and that version is lower or equal to the version you’re targeting.
图形化表示即:
The table listed earlier shows which versions of .NET Framework supports which version of .NET Standard:各框架对标准的支持情况。
1.4 | 1.5 | 1.6 | 2.0 | |
---|---|---|---|---|
.NET Framework | 4.6.1 | 4.6.2 | vNext | 4.6.1 |
.NET Standard 概要
Introducing .NET Standard
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。