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\AXDeployableRuntime_7.0.5095.41329_1.1.19037.1.zip'”
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 |
Rename-Item -Path $_.FullName -NewName “$TargetName.zip”
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: