entityframework core VS2017 migration file and designer file creating separately

entity-framework-core visual-studio-2017

Question

I am using VS2017 v15.4.1. and using EF Core 2.0. When i create a migration, the migration script is created inside \Migrations folder but the .designer.cs file is creating separately.

Can anyone help how to make the designer file get created inside the main migration file?

Thanksenter image description here

1
1
10/31/2017 11:11:57 AM

Popular Answer

Yes, we're all waiting for issue dotnet/project-system#159 to get fixed. 😉 Until then, you can manually edit the *.csproj file:

<ItemGroup>
  <Compile Update="MyMigration.Designer.cs">
    <DependentUpon>MyMigration.cs</DependentUpon>
  </Compile>
</ItemGroup>
4
10/31/2017 5:53:58 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow