Skip to content

[REGRESSION]: msdeploy in AzureRmWebAppDeployment ignores the skip directives #21114

@Jeroen4321

Description

@Jeroen4321

New issue checklist

Task name

AzureRmWebAppDeployment@4

Breaking task version

4.258.0

Last working task version

4.257.0

Regression Description

Command msdeploy in AzureRmWebAppDeployment@4 ignores the skip directives.

This causes issues with files being deleted/updated where they should be ignored.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

windows-latest

Relevant log output

Skip not working:
==============================================================================
Task         : Azure App Service deploy
Description  : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
Version      : 4.258.0
Author       : Microsoft Corporation
Help         : https://aka.ms/azureappservicetroubleshooting
==============================================================================
Got service connection details for Azure App Service:'mc-***-cd'
Trying to update App Service Application settings. Data: null
App Service Application settings are already present.
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='D:\a\1\a\wdp\webdeploypackage.zip' -dest:auto,ComputerName='https://mc-***-cd-staging.scm.azurewebsites.net:443/msdeploy.axd?site=mc-***-cd',UserName='$mc-***-cd__staging',Password='***',AuthType='Basic' -setParam:name='IIS Web Application Name',value='mc-***-cd' -enableRule:AppOffline -setParamFile=1750924710006_tempSetParameters.xml -skip:objectName="dirPath,absolutePath=App_Data\\Debug" -skip:objectName="dirPath,absolutePath=App_Data\\DeviceDetection" -skip:objectName="dirPath,absolutePath=App_Data\\diagnostics" -skip:objectName="dirPath,absolutePath=App_Data\\localization" -skip:objectName="dirPath,absolutePath=App_Data\\logs" -skip:objectName="dirPath,absolutePath=App_Data\\MediaCache" -skip:objectName="dirPath,absolutePath=App_Data\\packages" -skip:objectName="dirPath,absolutePath=App_Data\\publishrecovery" -skip:objectName="dirPath,absolutePath=App_Data\\serialization" -skip:objectName="dirPath,absolutePath=App_Data\\Submit" -skip:objectName="dirPath,absolutePath=App_Data\\tools" -skip:objectName="dirPath,absolutePath=App_Data\\viewstate" -userAgent:VSTS_e42923bb-a2ce-480e-b449-8dbf982cb166_build_1092_0
Info: Using ID [removed for clarity]
Info: Deleting [removed for clarity]
Info: Deleting [removed for clarity]
Info: Deleting [removed for clarity]
Info: Adding di[removed for clarity]
Info: Deleting [removed for clarity]
Info: Using ID [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating [removed for clarity]
Info: Updating file (C:\home\site\wwwroot\App_Data\debug\readme.txt).

Previous working version:
==============================================================================
Task         : Azure App Service deploy
Description  : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
Version      : 4.257.0
Author       : Microsoft Corporation
Help         : https://aka.ms/azureappservicetroubleshooting
==============================================================================
Got service connection details for Azure App Service:'mc-***-cd'
Trying to update App Service Application settings. Data: null
App Service Application settings are already present.
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='D:\a\1\a\wdp\webdeploypackage.zip' -dest:auto,ComputerName='https://mc-***-cd-staging.scm.azurewebsites.net:443/msdeploy.axd?site=mc-***-cd',UserName='$mc-***-cd__staging',Password='***',AuthType='Basic' -setParam:name='IIS Web Application Name',value='mc-***-cd' -enableRule:AppOffline -setParamFile=1750818646181_tempSetParameters.xml -skip:objectName=dirPath,absolutePath="App_Data\\Debug" -skip:objectName=dirPath,absolutePath="App_Data\\DeviceDetection" -skip:objectName=dirPath,absolutePath="App_Data\\diagnostics" -skip:objectName=dirPath,absolutePath="App_Data\\localization" -skip:objectName=dirPath,absolutePath="App_Data\\logs" -skip:objectName=dirPath,absolutePath="App_Data\\MediaCache" -skip:objectName=dirPath,absolutePath="App_Data\\packages" -skip:objectName=dirPath,absolutePath="App_Data\\publishrecovery" -skip:objectName=dirPath,absolutePath="App_Data\\serialization" -skip:objectName=dirPath,absolutePath="App_Data\\Submit" -skip:objectName=dirPath,absolutePath="App_Data\\tools" -skip:objectName=dirPath,absolutePath="App_Data\\viewstate" -userAgent:VSTS_e42923bb-a2ce-480e-b449-8dbf982cb166_build_1092_0
Info: Using ID '5c30910e-7248-4696-b3ed-776b682d886d' for connections to the remote server.
Info: Object dirPath (WebSite\App_Data\debug) skipped due to skip directive 'CommandLineSkipDirective 1'.

Full task logs with system.debug enabled

UNSUCCESSFUL RUN
 [REPLACE THIS WITH YOUR INFORMATION] 
SUCCESSFUL RUN
 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

- task: AzureRmWebAppDeployment@4
    displayName: Publish
    inputs:
      ConnectionType: 'AzureRM'
      azureSubscription: ****
      appType: 'webApp'
      WebAppName: ****
      deployToSlotOrASE: true
      ResourceGroupName: ****
      SlotName: 'staging'
      Package: <web deploy package>
      enableCustomDeployment: true
      SetParametersFile: setParameters.xml
      TakeAppOfflineFlag: true
      RemoveAdditionalFilesFlag: true 
      ExcludeFilesFromAppDataFlag: false 
      AdditionalArguments: |
        -skip:objectName=dirPath,absolutePath=App_Data\\Debug `
        -skip:objectName=dirPath,absolutePath=App_Data\\DeviceDetection `
        -skip:objectName=dirPath,absolutePath=App_Data\\diagnostics `
        -skip:objectName=dirPath,absolutePath=App_Data\\localization `
        -skip:objectName=dirPath,absolutePath=App_Data\\logs `
        -skip:objectName=dirPath,absolutePath=App_Data\\MediaCache `
        -skip:objectName=dirPath,absolutePath=App_Data\\packages `
        -skip:objectName=dirPath,absolutePath=App_Data\\publishrecovery `
        -skip:objectName=dirPath,absolutePath=App_Data\\serialization `
        -skip:objectName=dirPath,absolutePath=App_Data\\Submit Queue `
        -skip:objectName=dirPath,absolutePath=App_Data\\tools `
        -skip:objectName=dirPath,absolutePath=App_Data\\viewstate

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions