简体   繁体   English

无效 - 错误 NETSDK1045:当前 .NET SDK 不支持定位 .NET 6.0

[英]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我开始收到错误:错误 NETSDK1045:当前 .NET SDK 不支持定位 .NET 6.0

Visual Studio Version:视觉工作室版本: 在此处输入图像描述

I have followed lot of posts about:我关注了很多关于:

  • Updating Visual studio >> I am using latest更新 Visual Studio >> 我正在使用最新的
  • updating .net >> done更新 .net >> 完成
  • no MSBuildPath env variable没有 MSBuildPath 环境变量
  • no global.json set没有 global.json 设置

none of the solutions worked.没有一个解决方案奏效。

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

Any help任何帮助

Referring toAnnouncing .NET 6 :参考宣布 .NET 6

.NET 6 is supported with Visual Studio 2022 and Visual Studio 2022 for Mac. Visual Studio 2022和 Visual Studio 2022 for Mac 支持 .NET 6。 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). Visual Studio 2019、Visual Studio for Mac 8 或 MSBuild 16 不支持它。如果要使用 .NET 6,则需要升级到 Visual Studio 2022(现在也是 64 位)。

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.如果要使用 .NET 6,则需要更新到 Visual Studio 2022,因为 Visual Studio 2019 不支持它。

In this Developer Community issue , Microsoft have stated:这个开发者社区问题中,微软已经声明:

We have no plans to support .NET 6 in earlier versions of VS.我们没有计划在早期版本的 VS 中支持 .NET 6。 The general reason is that we add features to VS in order to support newer features in the runtime, languages, and libraries.一般的原因是我们向 VS 添加功能是为了支持运行时、语言和库中的新功能。 It's not practical to backport those.向后移植这些是不切实际的。

暂无
暂无

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

相关问题 NETSDK1045 当前的 .NET SDK 不支持面向 .NET Core 3.1 - 由缓存引起? - NETSDK1045 The current .NET SDK does not support targeting .NET Core 3.1 - Caused by Cache? gitlab CI 中的 ASP.NET 核心项目构建错误:错误 NETSDK1045:当前 .NET SDK 不支持面向 .NET Core 5.0 - ASP.NET core project build error in gitlab CI : error NETSDK1045: The current .NET SDK does not support targeting .NET Core 5.0 使用 Blazor Asp.NetCore 托管模板时获取“NETSDK1045 当前 .NET SDK 不支持 .NET Core 3.0 作为目标” - Getting “NETSDK1045 The current .NET SDK does not support .NET Core 3.0 as a target” when using Blazor Asp.NetCore hosted template 错误:当前的.NET SDK不支持定位.NET Standard 2.0 - Error: The current .NET SDK does not support targeting .NET Standard 2.0 当前的 .NET SDK 不支持面向 .NET Core 2.2 - The current .NET SDK does not support targeting .NET Core 2.2 Azure 构建管道 NuGet 还原错误 NETSDK1045 - Azure build pipeline NuGet Restore error NETSDK1045 当前的.NET SDK不支持定位.NET Core 2.2。 (SDK 2.2.202) - The current .NET SDK does not support targeting .NET Core 2.2. (SDK 2.2.202) 当前的 .NET SDK 不支持针对 .NET Core 2.1。 目标 .NET Core 1.1 或更低版本 - The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 1.1 or lower 警告 NETSDK1080:面向 .NET Core 3.0 或更高版本时,不需要对 Microsoft.AspNetCore.App 的 PackageReference - warning NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher 此项目使用的 Microsoft.NET.Sdk 版本不足以支持对面向 .NET Standard 1.5 或更高版本的库的引用 - The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM