0

I'm using migrate.exe and the error I'm getting is:

ERROR: More than one migrations configuration type was found in the assembly 'myfile'. Specify the name of the one to use.

However, when I add the /ContextTypeName:nameOfContext, then it gives the following error:

ERROR: The migrations configuration type 'ContextTypeName:nameOfContext' was not be found in the assembly 'myfile'.

I'm sure the contextType exists and I've spelled it properly, but I keep getting this error. Has anyone else encountered this situation or could tell me what I could be missing?

chillax786
  • 369
  • 4
  • 14

1 Answers1

1

I had the same problem you have to provide the configuration name in your command line:

PM> Add-Migration -ConfigurationTypeName YourDbConfig
PM> Update-Database -ConfigurationTypeName YourDbConfig

Here you will find a good description How do I enable EF migrations for multiple contexts to separate databases?

Community
  • 1
  • 1
Bassam Alugili
  • 16,345
  • 7
  • 52
  • 70