The term 'Update-Database' is not recognized as the name of a cmdlet

前端 未结 26 925
无人共我
无人共我 2020-12-07 19:35

I am using EF5 beta1 and while I was able to run the \"Update-Database\" before. Now that I shut down Visual Studio, I cannot get it to run. I get the following error:

26条回答
  •  自闭症患者
    2020-12-07 20:06

    you will get this error when the EF tools are not installed properly.

    try the below command in Nuget package manager //Uninstalls and install the same Version of EF

    Update-Package "EntityFramework" -reinstall
    

    If you still face the same issue. create a new Web Project and run the below command in nuget.

    (Note : no need to create the new Project in the same solution or same location.)

    // This will update EF to latest version(including the tools) // if you want to use specific version , use the -version flag.

    Update-Package "EntityFramework"
    

    Once this is done, chcek your original project and you can delete the newly created project.

提交回复
热议问题