简体   繁体   中英

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

.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. Do I need to install 4 separate frameworks? Or just one SDK? Why do I need both.NetStandard 2.0 and 1.3 or both frameworks 4.0 and 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.

Please consult the official documentation on .NET Standard: 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.

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

This is the official article about .NET Core support policy: 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. 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.

UPDATE 1: (about SDK versions in relation with VS 2017)

  1. .NET Core 2.1 and 2.2 SDK has its own versioning requirement when used within 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.
  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.

For more information, see also this GitHub issue: https://github.com/dotnet/sdk/issues/3124

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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