entityframework核心VS2017迁移文件和设计器文件分别创建

时间:2017-10-31 11:11:57

标签: visual-studio-2017 entity-framework-core

我正在使用VS2017 v15.4.1。并使用EF Core 2.0。 当我创建迁移时,迁移脚本在\ Migrations文件夹中创建,但.designer.cs文件是单独创建的。

任何人都可以帮助如何在主迁移文件中创建设计器文件吗?

感谢enter image description here

1 个答案:

答案 0 :(得分:4)

是的,我们等待问题dotnet/project-system#159得到修复。在此之前,您可以手动编辑*.csproj文件:

<ItemGroup>
  <Compile Update="MyMigration.Designer.cs">
    <DependentUpon>MyMigration.cs</DependentUpon>
  </Compile>
</ItemGroup>