简体   繁体   English

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

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

I'm getting the following 4 missing dependencies when trying to build Math.net Numerics in Visual Studio 2017尝试在 Visual Studio 2017 中构建 Math.net Numerics 时,我得到以下 4 个缺失的依赖项

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

I cant seem to find these SDKs or binary libraries or any information on how to install them.我似乎找不到这些 SDK 或二进制库或任何有关如何安装它们的信息。 Do I need to install 4 separate frameworks?我需要安装 4 个独立的框架吗? Or just one SDK?还是只有一个 SDK? Why do I need both.NetStandard 2.0 and 1.3 or both frameworks 4.0 and 4.6.1?为什么我需要.NetStandard 2.0 和 1.3 或框架 4.0 和 4.6.1?

Can somebody point me to a link where of what I need to install?有人可以指出我需要安装的链接吗? Thanks谢谢

.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 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.

Please consult the official documentation on .NET Standard: https://docs.microsoft.com/en-us/dotnet/standard/net-standard请查阅 .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. 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.

This is important because .NET Core 2.0 is not supported anymore, therefore it is strongly recommended to always use the minimum supported version of .NET Core 2.x.这很重要,因为不再支持 .NET Core 2.0,因此强烈建议始终使用 .NET Core 2.x 的最低支持版本。 In order to ensure longer support, please use .NET Core 2.1 instead of 2.2 because .NET Core 2.1 is LTS release, whereas .NET Core 2.2 is not.为了确保更长时间的支持,请使用 .NET Core 2.1 而不是 2.2,因为 .NET Core 2.1 是 LTS 版本,而 .NET Core 2.2 不是。

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

NOTES:笔记:

  1. If you have some time to sync up with .NET Core current development, you could start to port to .NET Core 3.0.如果您有时间与 .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). 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 has LTS model, which means lifetime of 3 years since its first release on May 30, 2018. Therefore the expected end of life will be around May 2021. .NET Core 2.1 具有 LTS model,这意味着自 2018 年 5 月 30 日首次发布以来的使用寿命为 3 年。因此预计使用寿命将在 2021 年 5 月左右。

UPDATE 1: (about SDK versions in relation with VS 2017)更新 1:(关于与 VS 2017 相关的 SDK 版本)

  1. .NET Core 2.1 and 2.2 SDK has its own versioning requirement when used within Visual Studio. .NET Core 2.1 和 2.2 SDK 在 Visual Studio 中使用时有自己的版本控制要求。 In the case for Visual Studio 2017, you need to have minimum version of 15.8.0, and if you want to use v2.2 you should have at least 15.9.1.对于 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. 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. 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.

For more information, see also this GitHub issue: https://github.com/dotnet/sdk/issues/3124有关更多信息,另请参阅此 GitHub 问题: https://github.com/dotnet/sdk/issues/3124

暂无
暂无

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

相关问题 如果库的目标是.NET Standard 2.0,那么我是使用Visual Studio 2017的唯一选择吗? - If a library is targeting .NET Standard 2.0 is my only option to use Visual Studio 2017? 使用 Visual Studio 2017 以 .NET Framework 2.0(不是 .NET Core 2.0)为目标 - Target .NET Framework 2.0 (not .NET Core 2.0) with Visual Studio 2017 如何将.NET Framework 3.5 SP1安装到Visual Studio 2017中 - How to install .NET Framework 3.5 SP1 into Visual Studio 2017 当前.NET SDK在Visual Studio 2017更新15.9.3中不支持定位.NET Standard 2.0错误,已安装.NET Core 2.2.1 SDK - The current .NET SDK does not support targeting .NET Standard 2.0 error in Visual Studio 2017 update 15.9.3, .NET Core 2.2.1 SDK installed 如何在Visual Studio 2017中添加.Net框架4.6.1类库而不是.Net标准? - How to add .Net framework 4.6.1 Class Library instead of .Net standard in Visual Studio 2017? 如何从Visual Studio 2017中的.NET Framework 4.5控制台应用程序引用.NET标准库? - How Do You Reference a .NET Standard Library from a .NET Framework 4.5 Console Application in Visual Studio 2017? 使用Visual Studio 2017的Asp Net Core 2.0的Crystal报表 - Crystal Report for Asp Net Core 2.0 With Visual Studio 2017 如何在 Visual Studio 中从我的 .NET 框架项目中定位 .NET 标准 2.0? - How do I target .NET Standard 2.0 from my .NET Framework project in Visual Studio? 在Visual Studio 2015中安装Net Core 2.0之后出现问题 - Problems after install Net Core 2.0 building in Visual Studio 2015 Visual Studio 2017 不会在 .NET Standard 库中加载 .NET Framework 引用 - Visual Studio 2017 won't load .NET Framework references in .NET Standard library
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM