C#C
C#3y ago
10 replies
Gipper

✅ I can't do migrations now...

when I do
add-migration nullableForeignsOnPublicacao
I get:
PM> add-migration nullableForeignsOnPublicacao
Both Entity Framework 6 and Entity Framework Core are installed. The Entity Framework 6 tools are running. Use 'EntityFrameworkCore\Add-Migration' for Entity Framework Core.
A version of Entity Framework older than 6.3 is also installed. The newer tools are running. Use 'EntityFramework\Add-Migration' for the older version.
No migrations configuration type was found in the assembly 'Trabalho Lab Aplicações Web'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).

So I tried
Enable-Migrations
, right? I got:
PM> Enable-Migrations
Both Entity Framework 6 and Entity Framework Core are installed. The Entity Framework 6 tools are running. Use 'EntityFrameworkCore\Enable-Migrations' for Entity Framework Core.
A version of Entity Framework older than 6.3 is also installed. The newer tools are running. Use 'EntityFramework\Enable-Migrations' for the older version.
No context type was found in the assembly 'Trabalho Lab Aplicações Web'.

Which I partially understand cause it wants a class inherint fro DbContext, but my context inherits from
IdentityDbContext
. What should I do?
Was this page helpful?