This should be a pretty basic question regarding parameter use when running the Enable-Migrations command for the first time for Entity Framework Code First in the Package Manager Console. Here is how my solution is separated out:
- I have a project called MyMvcApp.DomainEntities which contains my domain entity POCO classes and interfaces for their repositories.
- I have a project called MyMvcApp.DataModeling which contains the EF reference (DbContext, repository implementations).
- Lastly, I have a MyMvcApp.Web project which is the MVC4 project and also contains the EF connection string (to a local SQL Server DB) in the web.config.
When I run Enable-Migrations, I get a nasty error saying:
Could not load assembly 'MyMvcApp.DataModeling'. (If you are using Code First Migrations inside Visual Studio this can happen if the startUp project for your solution does not reference the project that contains your migrations. You can either change the startUp project for your solution or use the -StartUpProjectName parameter.)
I've run through seemingly every permutation of "Default Project Name" (the Package Manager Console drop down) and adding -ProjectName to no avail. (My solution's startup project is the MVC project FYI).
Given how I've separated my projects, how do I get the Enable-Migrations command to work?