Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

The term 'Update-Database' is not recognized as the name of #3166


User avatar
0
antonis created

I downloaded ASP.NET Core angular 2 v.4.0

I am trying to create the database. I followed this "Open Package Manager Console in Visual Studio, set .EntityFrameworkCore as the Default Project and run the Update-Database command as shown below: "

I am getting this error

The term 'Update-Database' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the 
path is correct and try again.
At line:1 char:1
+ Update-Database
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Update-Database:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I think, you need to set *.Web.Host project as startup project and select EfCore project in package manager console before running Update-Database command.

    Thanks.

  • User Avatar
    0
    antonis created

    I did. Still the same problem. Sometimes I restart Visual Studio and it works sometime it doesn't

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This is probably related to visual studio. I had this problem with other solutions as well.

    If we find any solution, I will let you know.

    Thanks.