I have multiple dbcontexts in a C# project and I'm trying to enable migrations, when I specify the full command ie:
"Enable-Migrations -ContextTypeName Models.Account.AccountDetailDbContext"
A migrations folder is created, with the configuration class
I then get a message:
"Checking if the context targets an existing database..."
"The migrations configuration type 'Portal.WebUI.Migrations.Configuration' was not be found in the assembly 'Portal.WebUI'."
Even though it has just created the file it can't find it.
Can anyone help on this please?
I have the correct project selected in the Package Manager Console
I have tried the command using -verbose, but it gives no additional information
If I copy the dbcontexts and classes into a new project then it all works, so it must be something in this existing project that it making the migration fail, but I can't tell what it is.
Thanks in advance for any answers
I managed to resolve this by uninstalling the EF nuget package and then reinstalling it.
Rather annoying...but I hope it helps someone else.