【发布时间】:2021-08-29 17:33:29
【问题描述】:
由于各种实体框架版本不兼容,我无法搭建 Razor 页面,因此我安装了所有版本 5.0.x 并更新了 .csproj 文件。但是当我构建解决方案时,它会变回以前的版本。
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Content Remove="Views\Logsign\signup.cshtml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.15">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.5" />
</ItemGroup>
</Project>
【问题讨论】:
标签: c# visual-studio entity-framework asp.net-core csproj