[英]Visual Studio "Project reference" references to lower version of package
Have two projects, lets assume "Project" & "Project.Tests" (xUnit project)有两个项目,假设“Project”和“Project.Tests”(xUnit 项目)
Build fails after adding "Project" as a project reference to "Project.Tests" by the following error添加“Project”作为对“Project.Tests”的项目引用后构建失败,出现以下错误
It becomes little bit strange after looking to the dependencies查看依赖项后变得有点奇怪
"Project" dependencies: “项目”依赖项:
"Project.Tests" dependencies: “Project.Tests”依赖项:
Both projects have the same dotnet core version两个项目具有相同的 dotnet core 版本
The question is, why does such a thing happen if i'm referencing to a project (not manually install a package with specific version)?问题是,如果我引用一个项目(不是手动安装特定版本的 package),为什么会发生这种事情?
Fortunately I figured out the problem.幸运的是我发现了问题。
"Project" has a nuget package "Microsoft.EntityFrameworkCore.Design" of version 3.1.7(which causes problem), after downgrading it to the version 3.1.4 problem was resolved. “项目”有一个 3.1.7 版本的 nuget package“Microsoft.EntityFrameworkCore.Design”(导致问题),将其降级到 3.1.4 版本后问题得到解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.