Skip to content

Fix NuGet package path validation in nuget-stage pipeline#40293

Merged
benhillis merged 1 commit intomasterfrom
user/benhill/fix-nuget-package-path
Apr 24, 2026
Merged

Fix NuGet package path validation in nuget-stage pipeline#40293
benhillis merged 1 commit intomasterfrom
user/benhill/fix-nuget-package-path

Conversation

@benhillis
Copy link
Copy Markdown
Member

The NuGet publish step in the nuget-stage pipeline used relative paths for both the artifact download and packagesToPush. The pipeline validation requires these paths to start with the expected parent directory.

This change makes both paths absolute using Build.SourcesDirectory so that the download location and the push path are consistent and pass validation.

Use absolute paths for artifact download and packagesToPush so that
the NuGet validation step can verify the package location. The relative
path 'drop/nuget/...' was not recognized as being under the expected
parent directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 23, 2026 21:12
@benhillis benhillis requested a review from a team as a code owner April 23, 2026 21:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes NuGet publish validation failures in the nuget-stage Azure DevOps pipeline by ensuring both the artifact download location and the packagesToPush path are rooted under $(Build.SourcesDirectory) (i.e., an allowed parent directory for the pipeline’s path validation).

Changes:

  • Update DownloadPipelineArtifact@2 to download the NuGet artifact into $(Build.SourcesDirectory)\drop.
  • Update NuGetCommand@2 packagesToPush to reference the downloaded .nupkg via an absolute path under $(Build.SourcesDirectory)\drop\nuget\....

@benhillis benhillis merged commit e1acbd2 into master Apr 24, 2026
13 checks passed
@benhillis benhillis deleted the user/benhill/fix-nuget-package-path branch April 24, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants