Enable-Migrations - Cannot bind argument to parameter 'Path'

前端 未结 7 1692
青春惊慌失措
青春惊慌失措 2020-12-20 18:34

I\'m new to ASP.NET and am trying to set up a webAPI c# application with entity framework. But when I try to run the Enable-Migrations command on nuget-package-manager conso

7条回答
  •  抹茶落季
    2020-12-20 18:57

    I get this if I have my database code in a separate class library. To get the commands to work I had to select the class library as the start up project.

    So I did the following...

    Select the project where the database context exists and right click, select "Set as StartUp Project".

    Select the default project as the correct project.

    Ensure that you are in the project directory on the filesystem.

    Run the commands.

提交回复
热议问题