Solving error “Leaf path not found”​ in DynOps Release Pipelines

I´m using the awesome new feature to upload packages to LCS with Azure DevOps Pipelines, but after each platform/application hotfix deployment to the build server(s) I forget to change the field “File to upload” of the upload task. The result is that the upload to LCS asset library (during release creation) fails with error message: “Leaf path not found: ‘D:\a\r1\a\OneVersion – Release Sandbox\Packages\'”

The fragile part of the upload task is the D365FO build version (e.g. 7.0.5095.41329) which is used during package generation.

If you want to get rid of this problem you simply have to add a PowerShell task to your release pipeline to rename AXDeployableRuntime*.zip to something more stable . In my case I simply used the release name. Thanks Joris de Gruyter for the hint how to handle this problem!

Source of the PowerShell inline task:

$PackgesFolder=”$(System.DefaultWorkingDirectory)/OneVersion – Release Sandbox/Packages”


if ((Test-Path -Path $PackgesFolder) -eq $true)


   Get-ChildItem $PackgesFolder -Filter AXDeployableRuntime*.zip |

   Foreach-Object {

       Rename-Item -Path $_.FullName -NewName “$”            



The field “File to upload” of the upload to LCS task should look like this: $(System.DefaultWorkingDirectory)/OneVersion – Release Sandbox/Packages/$(Release.ReleaseName).zip

If you haven’t setup your Azure DevOps Release Pipeline you can find the documentation here:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s