我将项目从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项目上的管道Nuget还原失败(NU1202)
发布评论