skip to Main Content

Getting the follow error deploying to Azure App Service.

2023-11-06T22:17:18.7364356Z [command]"C:Program FilesIISMicrosoft Web Deploy V3msdeploy.exe" -verb:sync -source:package='D:cr2btest1 & test2 artifactsdroptest2_888.zip' -dest:contentPath='azureWebDev',ComputerName='https://mycomputername.net',UserName='$myUsername',Password='***',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_sd1324dc-7762-4e41-8aa2-b2abcde_Release__1234_5678_9
2023-11-06T22:17:18.7364356Z [command]"C:Program FilesIISMicrosoft Web Deploy V3msdeploy.exe" -verb:sync -source:package='D:cr2btest1 & test2 artifactsdroptest2_888.zip' -dest:contentPath='azureWebDev',ComputerName='https://mycomputername.net',UserName='$myUsername',Password='***',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_sd1324dc-7762-4e41-8aa2-b2abcde_Release__1234_5678_9
2023-11-06T22:17:18.7364356Z [command]"C:Program FilesIISMicrosoft Web Deploy V3msdeploy.exe" -verb:sync -source:package='D:cr2btest1 & test2 artifactsdroptest2_888.zip' -dest:contentPath='azureWebDev',ComputerName='https://mycomputername.net',UserName='$myUsername',Password='***',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_sd1324dc-7762-4e41-8aa2-b2abcde_Release__1234_5678_9
2023-11-06T22:17:18.9042826Z ##[error]Error: Error: A '-dest' argument must be specified with the 'sync' verb.
Error count: 1.
'test2' is not recognized as an internal or external command,
operable program or batch file.

As far as I can tell, no changes were made to the release pipeline or the pipeline itself. I have tried removing all spaces in source alias ("test1 & test2 artifacts" to "test1&test2artifacts") as per a related error in this post but the -dest argument error still comes up.

2

Answers


  1. If you use command lines to run the deployment, you can try to use the double quotation (" ") to surround the patten of package path.

    For example:

    "$(Build.BinariesDirectory)test1 & test2 artifactsdroptest2_888.zip"
    

    Similar, if you use the Azure App Service deploy task, in the filed ‘Package or folder‘, you also can try to set its value like as above.

    enter image description here

    Login or Signup to reply.
  2. Am experiencing the same issue, try removing the & from your source alias.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search