No connection string named 'MyApplicationEntities' could be found in the application config file

前端 未结 8 1044
故里飘歌
故里飘歌 2020-12-03 00:34

I just install EF 4.3 and trying to upgrade my project with migration. however I am getting issues with trying to execute add-migration initial to my project vi

8条回答
  •  鱼传尺愫
    2020-12-03 01:10

    I had the same error but I already had a web.config file with the correct connection string name and a DbContext declared correctly. However, I noticed when I ran add-migration with -Verbose it state the 'Startup Project' as a different project than the one containing my context. So I change the Startup Project, re-ran the add-migration and it all worked!!

提交回复
热议问题