Enable-Migrations installation error

前端 未结 5 1326
春和景丽
春和景丽 2020-12-06 10:06

I\'m running into a problem when enabling migrations on one of my projects. I execute Enable-Migrations command from the Nuget Console and receive an err

5条回答
  •  無奈伤痛
    2020-12-06 10:28

    it turns out when you use code first migrations you have to specify a startup project in VS referencing the project where your migrations are defined elsewhere it wont be able to load the project.

    (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.)

提交回复
热议问题