简体   繁体   English

当前的 .NET SDK 不支持面向 .NET Core 2.2。 以 .NET Core 2.1 或更低版本为目标

[英]The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or lower

Hi I am using VS 2017 Commuity.嗨,我正在使用 VS 2017 社区。 When I build I am getting the this error I have also installed latest sdk , even I am having same issue.当我构建时,我收到此错误我也安装了最新的 sdk ,即使我遇到了同样的问题。 Kindly help请帮忙

It's very important and not necessarily obvious, but you'll want to make sure that you explicitly target the 2.2.1xx version when running Visual Studio 2017 as the build versions differ between Visual Studio 2017 and 2019 :这非常重要且不一定显而易见,但您需要确保在运行 Visual Studio 2017 时明确定位 2.2.1xx 版本,因为 Visual Studio 2017 和 2019 之间的构建版本不同

  • Visual Studio 2019 - 2.2.2xx Visual Studio 2019 - 2.2.2xx
  • Visual Studio 2017 - 2.2.1xx Visual Studio 2017 - 2.2.1xx

It's very likely that you installed the latest version, but not necessarily the one with support for Visual Studio 2017. You can find the appropriate version for 2017/2019 from the .NET Core Download page here that demonstrates the distinction between the two SDKs and which version of Visual Studio is supported for each:您很可能安装了最新版本,但不一定是支持 Visual Studio 2017的版本。您可以在此处的 .NET Core 下载页面中找到适用于 2017/2019 的版本,该页面演示了两种 SDK 之间的区别以及哪些每个版本都支持 Visual Studio 版本:

Visual Studio 2017 版本

In my case, the following fixed the issue:就我而言,以下解决了该问题:

Find out the latest SDK installed by issue the following command in CMD:通过在 CMD 中发出以下命令找出安装的最新 SDK:

dotnet --list-sdks

Then in your project's global.json file, update the version to the latest version found from previous command:然后在您项目的 global.json 文件中,将版本更新为从上一个命令中找到的最新版本:

{
  "sdk": {
    "version": "3.1.302"
  }
}

暂无
暂无

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

相关问题 目前.NET SDK不支持针对.NET Core 2.1。 要么以 .NET Core 2.0 或更低版本为目标,要么使用支持 .NET Core 2.1 的 .NET SDK - The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a .NET SDK that supports .NET Core 2.1 NETSDK1045当前的.NET SDK不支持定位.NET Core 3.1。 目标.NET Core 2.2或 - NETSDK1045 The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 2.2 or “当前的.net SDK不支持定位.net核心2.2” - “the current .net sdk does not supporting targeting .net core 2.2” docker-compose up 失败:当前 .NET SDK 不支持面向 .NET Core 2.2 - docker-compose up failes: The current .NET SDK does not support targeting .NET Core 2.2 目前.NET SDK不支持定位.NET 6.0。 要么以 .NET 5.0 或更低版本为目标,要么使用支持 .NET 6.0 的 .NET SDK 版本 - The current .NET SDK does not support targeting .NET 6.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 6.0 当前 .NET SDK 不支持针对 .NET Core 3.0 | 3.1 | 5.0 | 6.0 - The current .NET SDK does not support targeting .NET Core 3.0 | 3.1 | 5.0 | 6.0 当前.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 当前的.NET SDK不支持以.NET Standard 2.0为目标 - The current .NET SDK does not support targeting .NET Standard 2.0 多目标 .net 核心 2.2 与 .net 4.6.1 - Multi-targeting .net core 2.2 with .net 4.6.1 .Net Core 2.1 是否支持 LINQ 和 Lambda 表达式? - Does .Net Core 2.1 Support LINQ and Lambda Expressions?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM