.Net Core 3.0 Preview 8 项目 (NU1202) 上的管道 Nuget 还原失败

编程入门 行业动态 更新时间:2024-10-26 10:33:30
本文介绍了.Net Core 3.0 Preview 8 项目 (NU1202) 上的管道 Nuget 还原失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我将一个项目从 netcoreapp2.2 更新到 netcoreapp3.0,并使用 Preview8 SDK 以及 Microsoft.EntityFrameworkCore.SqlServer、工具和设计.

I updated a project from netcoreapp2.2 to netcoreapp3.0 and use Preview8 SDK as well as Microsoft.EntityFrameworkCore.SqlServer, tools, and design.

我可以在本地构建和运行我的项目,只需找到 (VS 2019).但是当我尝试使用 Azure DevOps 进行部署时,Nuget 还原会出现以下错误:

I can build and run my projects locally just find (VS 2019). But when I try to deploy with Azure DevOps, the Nuget restore gives this error:

NU1202:包 Microsoft.EntityFrameworkCore.SqlServer 3.0.0-preview8.19405.11 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容.包 Microsoft.EntityFrameworkCore.SqlServer 3.0.0-preview8.19405.11 支持:netstandard2.1 (.NETStandard,Version=v2.1)

NU1202: Package Microsoft.EntityFrameworkCore.SqlServer 3.0.0-preview8.19405.11 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Microsoft.EntityFrameworkCore.SqlServer 3.0.0-preview8.19405.11 supports: netstandard2.1 (.NETStandard,Version=v2.1)

对 EntityFrameworkCore 包的每次引用都会导致该错误.

Every reference to an EntityFrameworkCore package will result in that error.

我正在通过 global.json 将管道中的 .Net Core SDK 设置为 Preview8.

I'm setting the .Net Core SDK in the pipeline to Preview8 via a global.json.

我有一个 NuGet 工具安装程序任务,引入了最新版本,还有一个针对我的解决方案运行的 Nuget Restore 任务命令.

I have a NuGet tool installer task, bringing in the latest version, and a Nuget Restore task command running against my solution.

推荐答案

我的问题是我使用的是 Nuget Restore.将其更改为 dotnet restore 就成功了.

My problem was that I was using the Nuget Restore. Changing it to dotnet restore made the trick.

这篇关于.Net Core 3.0 Preview 8 项目 (NU1202) 上的管道 Nuget 还原失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-14 16:16:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/845326.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:管道   项目   Net   Core   Nuget

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!