我创建了一个.NET Core应用程序。我正在使用Entity Framework Core和Code第一种方法,我正在创建迁移。
由于某种原因,迁移的.designer.cs
文件与主要的.cs
文件无关。
我已经看过这个solution但是对于.net核心应用程序似乎不正确。
有什么帮助吗?
谢谢
尝试使用Update而不是Include。
在.csproj
文件中,将这些行添加到ItemGroup
:
<Compile Update="yourfilename.Designer.cs">
<DependentUpon>yourfilename.cs</DependentUpon>
</Compile>