1 Migrating from Web Deploy to Run From Package deployment mechanism
Vincent A (vinca) редактировал(а) эту страницу 2019-02-08 22:27:41 +05:30

Azure App Service Deploy, Azure Web App Deploy and Azure Functions Deploy task supports Run From Package as default deployment mechanism, as it has many benefits compared to MSDeploy (Web Deploy).

But, Web packages created using MSBuild task (with default arguments) has a nested folder structure that can only be deployed correctly by Web Deploy. If Run From Package is used for the above packages, the web package would be copied without honoring the nested folder structure and can cause runtime issues.

To convert the packaging structure, follow the below steps:

  • In Build Solution task, change the MSBuild Arguments to /p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True /p:publishUrl="$(System.DefaultWorkingDirectory)\\WebAppContent" image

  • Add Archive Task and change the inputs as follows:

    • Change Root folder or file to archive to $(System.DefaultWorkingDirectory)\\WebAppContent
    • Disable Prepend root folder name to archive paths option

image