我可以在 netstandard2.0 项目中使用 netstandard1.* 库吗?

Can I use netstandard1.* libraries in netstandard2.0 project?

由于主要版本号已更改,我想 netstandard2.0 包含与 netstandard1.* 不兼容的更改。

使用 netstandard2.0 项目中的 netstandard1.* 库有什么限制吗?

您可以在 netstandard2.0 项目中使用任何 netstandard1.* 库。 来自 .NET Standard versioning rules:

Additive: .NET Standard versions are logically concentric circles: higher versions incorporate all APIs from previous versions. There are no breaking changes between versions.

specific for .NET Standart 2. breaking change clarification:

Based on community feedback, we decided not to make .NET Standard 2.0 be a breaking change from 1.x. Instead, .NET Standard 2.0 is a strict superset of .NET Standard 1.6. The plan for handling .NET Framework 4.6.1 and .NET Standard 2.0 is outlined in the spec.


一般来说,您的项目的 .NET Standard 版本会影响以下方面:

  • 版本越高,可用的API越多。
  • 版本越低,支持的平台越多