I\'m using web deploy to deploy an MVC4 application using EF5 code first. I made a publish profile called \"development\" that uses web deploy for application and database u
Here is the right answer - is solved the problem for me. Just rename your connection string exactly as your DbContext, e.g.
public ApplicationDbContext()
: base("Vocabulary.Domain.ApplicationDbContext", throwIfV1Schema: false)
{
}
Note that name should include namespace like "Vocabulary.Domain.ApplicationDbContext". Don't forget to update .pubxml files:
This article describes when publish dialog has or has no the tick "Execute Code First Migrations (runs on application start)"