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

Time:08-10

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

Visual Studio Version: enter image description here

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' enter image description here

Any help

CodePudding user response:

Referring to Announcing .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.

  • Related