簡體   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