Entity Framework Code First Data Migrations not working with VS2012 Web Deploy

匆匆过客 提交于 2019-12-04 03:02:40

I have discovered the solution to this problem through experimentation.

In fact, my MVC application was created by VS2012 by converting from a VS2010 solution. Since the conversion process did not report any issues, I assumed that it had correctly converted everything, including the publishing profiles.

However, I discovered that the problem was in the conversion of these profiles and, unless I manually edit their XML files, there is apparently no way to get old imported profiles to participate in Code First Migrations.

Simply creating new publishing profiles in the converted solution results in the expected behavior.

Try this: Enable-Migrations -Force

Ensure the below is set to true AutomaticMigrationsEnabled = true;

Republish - worked for me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!