When I release my Asp.Net MVC app to azure web app using VSTS and a Hosted VS2017 agent, the EF Migration (to Azure SQL) doesn\'t execute on application start the same way it ca
Is possible to have VSTS use the same Publish Profile as in VS which in my case is a Web Deploy process to Azure Web App and includes the option to run migrations on application start.
In the VSTS build definition, Variables tab, add the following entries:
DeployOnBuild: true
PublishProfile: NameOfTheVSPublishProfileFile
DesktopBuildPackageLocation: $(System.DefaultWorkingDirectory)/MyBuildFolderName/drop/MyProjectZipName.zip
Then Build and Release.
Next time you run the app the new migrations will execute in the same way as when publishing from VS.