azure-pipelines-tasks: AzureRM Web App Deployment fails with `Error: Set parameters file not found`

One of the most frustrating things with using these tasks is the code base changing underneath and something succeeding just fine months ago now starts failing.

A release management environment step using the AzureRM Web App Deployment was succeeding as of July 27 2016 is now failing two months later in a release to that environment Sep 29 2016. The release definition has not changed in that time period. /sigh

The SetParameters File option is blank and it’s states this is optional.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 27

Most upvoted comments

@rglos @JoeBrockhaus @mimicx10

Can you confirm if you are still facing this issue ? can you also confirm if your task being got updated to version 2.0.2 or not ?

Hosted releases for us are now up to 2.0.2. Private build server still using 2.0.1

If you’re still having this problem, here’s a little PS to make the necessary change using VSTS.

  • Use the PowerShell++ Task to run this as Inline - the ‘PowerShell’ Task has an arbitrarily tiny maxlength for what you can inline…
$path = "C:\apps\buildagent\tasks\AzureRMWebAppDeployment\2.0.1\"
if (Test-Path $path) {
    $jsFilePath = $path + "azurermwebappdeployment.js"
    $tsFilePath = $path + "azurermwebappdeployment.ts"

    $oldLine = "*(!tl.filePathSupplied('SetParametersFile'))*"
    $newLine = @"
        // https://github.com/Microsoft/vsts-tasks/issues/2719
        // if(!tl.filePathSupplied('SetParametersFile')) {
        if ((!tl.filePathSupplied('SetParametersFile')) || setParametersFile == tl.getVariable('System.DefaultWorkingDirectory')) {
"@

    $jsContent = Get-Content $jsFilePath
    $jsContent | % { If ($_.ReadCount -eq 211 -and $_ -like $oldLine) {$newLine} Else {$_} } | Set-Content -Path $jsFilePath

    $tsContent = Get-Content $tsFilePath
    $tsContent | % { If ($_.ReadCount -eq 226 -and $_ -like $oldLine) {$newLine} Else {$_} } | Set-Content -Path $tsFilePath
}
else { "C:\apps\buildagent\tasks\AzureRMWebAppDeployment\2.0.1\ does not exist" }

we’re also experiencing this issue

(running 2.0.1, it hasn’t updated to 2.0.2)

@Ajay-MS I am still receiving this error. However, my build agent does not yet have the updated 2.0.2 task.