Database Migration for production RRS feed

  • Question

  • Hi All,

    I can't understand what i can do for migration database for my production server. Local machine work properly

    I have ASP.NET Core 2.0 application, and in publishing setting i have settings for migration to remote database and its worked...

    What i do:

    1. Remove local database
    2. Add-Migration Initialize
    3. Update-Database
    4. Publishing web site (and database created on remote server with all i need tables)

    After I open my production web site and see "There are migrations for ApplicationDbContext that have not been applied to the database" and button for "Apply Migrations", when i click i have a error: "An error occurred applying migrations, try applying them from the command line" and some options for update manualy. 

    My manualy command "dotnet ef database update" on production have error "No executable found matching command "dotnet-ef"

    • Moved by 宝宝徐 Wednesday, September 20, 2017 2:20 AM
    Wednesday, September 13, 2017 4:58 AM

All replies

  • Hi Alexey.U,

    Welcome to MSDN forum.

    This forum is discussing Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. I recommend you open a new thread in asp.net core forum to get support about Database Migration. Thank you for understanding.

    Best regards,


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 14, 2017 2:28 AM