繁体   English   中英

如何将 .net 标准 2.0 安装到 Visual Studio 2017 中

[英]How to install .net standard 2.0 into Visual studio 2017

尝试在 Visual Studio 2017 中构建 Math.net Numerics 时,我得到以下 4 个缺失的依赖项

.NETFramework 4.0
.NETFramework 4.6.1
.NETStandard 1.3
.NETStandard 2.0

我似乎找不到这些 SDK 或二进制库或任何有关如何安装它们的信息。 我需要安装 4 个独立的框架吗? 还是只有一个 SDK? 为什么我需要.NetStandard 2.0 和 1.3 或框架 4.0 和 4.6.1?

有人可以指出我需要安装的链接吗? 谢谢

.NET Standard 2.0 comes with any installation of .NET Core 2.x SDK, this means including .NET Core runtime of 2.0, 2.1, and 2.2.

请查阅 .NET 标准的官方文档: https://docs.microsoft.com/en-us/dotnet/standard/net-standard

Since October 2019, the recommended way to have .NET Standard 2.0 is by having synchronized with .NET Core lifecycle, therefore it is recommended to have at least the LTS version of .NET Core 2.1 SDK or .NET Core 2.2.

这很重要,因为不再支持 .NET Core 2.0,因此强烈建议始终使用 .NET Core 2.x 的最低支持版本。 为了确保更长时间的支持,请使用 .NET Core 2.1 而不是 2.2,因为 .NET Core 2.1 是 LTS 版本,而 .NET Core 2.2 不是。

这是关于.NET核心支持政策的官方文章: https://dotnet.microsoft.com/platform/support/policy/dotnet-core

笔记:

  1. 如果您有时间与 .NET Core 当前开发同步,您可以开始移植到 .NET Core 3.0。 Because latest release of .NET Core is .NET Core 3.0 supports both .NET Standard 2.1 and .NET Standard 2.0 that was brought in .NET Core 2.x (for backward compatibility).
  2. .NET Core 2.1 具有 LTS model,这意味着自 2018 年 5 月 30 日首次发布以来的使用寿命为 3 年。因此预计使用寿命将在 2021 年 5 月左右。

更新 1:(关于与 VS 2017 相关的 SDK 版本)

  1. .NET Core 2.1 和 2.2 SDK 在 Visual Studio 中使用时有自己的版本控制要求。 对于 Visual Studio 2017,您需要具有最低版本 15.8.0,如果您想使用 v2.2,您应该至少具有 15.9.1。
  2. For .NET Core 2.1, you should ensure that you have .NET Core SDK 2.1.5xx for VS 2017. For example, .NET Core SDK 2.1.500, 2.1.501, 2.1.502 are used for VS 2017.
  3. The VS 2017 15.9.1 (or later VS 2017 updates) is not compatible with 2.1 SDK version 2.1.6xx, 2.1.7xx, 2.1.8xx because these .NET Core 2.1 SDK versions are only compatible with VS 2019.

有关更多信息,另请参阅此 GitHub 问题: https://github.com/dotnet/sdk/issues/3124

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM