I have a .NET Core 3.0 solution that contains 5 projects. One of the projects uses EF6, and another one uses EF Core, so EF6 and EF Core are being used side-by-side. Visual Studio is as fresh as possible (16.3.5). Trying to create migration for the project that uses EF6 and executing the Add-Migration command on my laptop with Windows 10 I see a warning message: "Both Entity Framework 6 and Entity Framework Core are installed. The Entity Framework 6 tools are running. Use 'EntityFrameworkCore\Update-Database' for Entity Framework Core", but all goes fine and migration completes successfully.
The Get-Module command displays the following table:
---------- ------- ---- ----------------
Script 6.3.0 EntityFramework6 {Add-EFDefaultConnectionFactory, Add-EFProvider, Add-Migration, Enable-Migrations...}
Script 3.0.0 EntityFrameworkCore {Add-Migration, Drop-Database, Enable-Migrations, Get-DbContext...}
Script 2.0.0.0 NuGet {Add-BindingRedirect, Find-Package, Get-Package, Get-Project...}
Script 0.0 profile
On another workstation with Windows 7 onboard, running the same command I see almost the same table but with empty list of cmdlets exported by EF6:
---------- ------- ---- ----------------
Script 6.3.0 EntityFramework6
Script 3.0.0 EntityFrameworkCore {Add-Migration, Drop-Database, Enable-Migrations, Get-DbContext...}
Script 2.0.0.0 NuGet {Add-BindingRedirect, Find-Package, Get-Package, Get-Project...}
Script 0.0 profile
Eventually, in such a case I can't perform migrations on EF6-bound project at all. How could I fix that? Neither 'Add-Migration' nor 'EntityFramework\Add-Migration' nor 'EntityFrameworkCore\Add-Migration' won't work.
UPDATE 17 oct 2019 That seems to me that my VS installation is corrupted. The good news is that EF6.3 comes with the ef.exe utility that replaces migrate.exe and allows a developer to create migrations using command line outside VS IDE.