错误 NETSDK1045:当前 .NET SDK 不支持面向 .NET 8.0。任一目标

问题描述 投票:0回答:1

我使用 .NET 8.0 框架在 Visual Studio 2022 中使用默认模板创建了简单的 ASP.NET Core 项目,并将其推送到 Azure 存储库(包括 Visual Studio 的文件

.gitignore
)并创建了一个 CLASSIC BUILD EDITOR 管道。

我删除了测试用例,因为我的目标是创建一个工件。我在 Nuget 还原运行时收到错误。请参考以下错误的屏幕截图以及我所做的操作:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

asp.net-core azure-devops msbuild azure-pipelines
1个回答
0
投票

我可以根据您的描述重现该问题。这是因为模板使用的是

windows-2019
的代理,并且要安装的NuGet工具版本是
4.4.1

我们可以检查

Always download the latest matching version
任务的
Use NuGet
并选择使用
windows-2022
代理来运行此管道并构建解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.