Debug and Release, Deploy-Options RRS feed

  • Question

  • User-1165820363 posted

    Hi all,

    I don't know exactly if this thread is correct in here but I'll give it a try.

    In Visual Studio 2019 there's this dropdown box with Debug or Release below the menubar.

    I've developed an Asp.Net core webpage and want to WebDeploy it to my Release server just for testing.

    The webapplication is using the appsettings.json and appsettings.Development.json where different connectionstrings were set.
    One for my development db, the other for the release-server.

    Typically my ef-migrations were done in the development environment and I was assuming that changing the dropdown to "Release" EF would detect that the release-db is not existing.
    Running Update-Database from the Package-Manger Console then says that the db is already uptodate.

    So when the deployment ist done  (which went without errors - application runs) how do I get the database to the server?

    Thanks for your help.

    Saturday, May 4, 2019 2:22 PM

All replies

  • User-1174608757 posted

    Hi -nin,

    Running Update-Database from the Package-Manger Console then says that the db is already uptodate.

    According to your description, could you please tell me the updated db is correct or not correct?If it is correct.so it confirms that the connectionstring has no problem and it has already updated because migrations files in your core application has make change to db.You could see as below:

    This migration files has already made changes to db in server so it will show this message.So you could delete these files and  run web application again.

    Else if db is not right, you should firstly, make sure that the connection string is write , I suggest that you could delete the db(sure it is not correct) and migrations files, then use new connection string   to see whether you could connect to target server.You could see as below:

    Here is the link ,I hope it could help you.


    Best Regards


    Monday, May 6, 2019 6:25 AM