简体   繁体   中英

None worked - Error NETSDK1045: The current .NET SDK does not support targeting .NET 6.0

I started getting error: Error NETSDK1045: The current .NET SDK does not support targeting .NET 6.0

Visual Studio Version: 在此处输入图像描述

I have followed lot of posts about:

  • Updating Visual studio >> I am using latest
  • updating .net >> done
  • no MSBuildPath env variable
  • no global.json set

none of the solutions worked.

'dotnet info outout' 在此处输入图像描述

Any help

Referring toAnnouncing .NET 6 :

.NET 6 is supported with Visual Studio 2022 and Visual Studio 2022 for Mac. It is not supported with Visual Studio 2019 , Visual Studio for Mac 8, or MSBuild 16. If you want to use .NET 6, you will need to upgrade to Visual Studio 2022 (which is also now 64-bit).

If you want to use .NET 6 you will need to update to Visual Studio 2022, as it is not supported in Visual Studio 2019.

In this Developer Community issue , Microsoft have stated:

We have no plans to support .NET 6 in earlier versions of VS. The general reason is that we add features to VS in order to support newer features in the runtime, languages, and libraries. It's not practical to backport those.

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