问题描述
我需要使用add-migration命令和update-datebase在.Net Core 3.1中生成数据库。但是由于在project.csproj文件上添加了多个框架而无法生成迁移文件?请您能帮帮我吗?我在下面附加了我的代码:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<ItemGroup>
<packagereference Include="Microsoft.EntityFrameworkCore.sqlServer" Version="3.1.7" />
<packagereference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</packagereference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OnlineshoppingCart\OnlineshoppingCart.csproj" />
</ItemGroup>
</Project>
错误:
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)