.designer file of migration in EF core not being associated with .cs file in visual studio

.net-core ef-migrations entity-framework-core visual-studio-2017

Question

I have created a .NET Core application. I am using Entity Framework Core with Code first approach and I am creating migrations.

For some reason the .designer.cs file of the migration is not associated with the principal .cs file.

enter image description here

I have seen this solution but it seems is not correct for .net core application.

Any help please?

Thank you

1
0
3/31/2019 2:35:41 PM

Popular Answer

Try to use Update instead of Include.

In your .csproj file, add these lines to the ItemGroup:

<Compile Update="yourfilename.Designer.cs">
    <DependentUpon>yourfilename.cs</DependentUpon>
</Compile>
0
4/1/2019 1:24:47 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