【发布时间】:2021-05-20 15:56:18
【问题描述】:
我正在使用 asp.net core 3.1 开发一个项目,我必须使用 Visual Studio 2019 搭建 Identity。这是来自 .csproj 文件的代码
<TargetFramework>netcoreapp3.1</TargetFramework>
所有依赖项都具有相同的版本,即 3.1.0,但是当我尝试搭建 Identity Visual Studio 时,会自动将 <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.5" /> 更新为最新的支持版本。我尝试将我的项目更新为 asp.net 5.0,但随后将包更新为 <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />。 Visual Studio 创建的版本不匹配会导致以下错误
运行选定的代码生成器时出错:'包还原失败。回滚 [Project Name] 的包更改
我尝试使用 NuGet 包管理器更新所有已安装的包,但没有任何效果。 如何防止 Visual Studio 在脚手架之前更新依赖项?或如何同步这些版本。
【问题讨论】:
标签: c# asp.net visual-studio asp.net-core visual-studio-2019