Skip to content

Use NuGetCommand to install YamlDotNet from CFS feed#29241

Merged
vidai-msft merged 1 commit intomainfrom
vidai/sync-alias
Mar 9, 2026
Merged

Use NuGetCommand to install YamlDotNet from CFS feed#29241
vidai-msft merged 1 commit intomainfrom
vidai/sync-alias

Conversation

@vidai-msft
Copy link
Copy Markdown
Contributor

Description

This pull request refactors the installation and usage of the YamlDotNet NuGet package in the Azure pipeline and PowerShell script to improve reliability and consistency. The most important changes are grouped below:

Pipeline and package installation improvements:

  • Replaced the manual PowerShell-based installation of YamlDotNet with a dedicated NuGetCommand@2 task in .azure-pipelines/sync-aliases.yml, using explicit arguments for version and output directory, and reduced retry count for failures.
  • Updated environment variables passed to the PowerShell task to include YAMLDOTNETVERSION, ensuring the script receives the correct version information.

Script update for package location:

  • Modified tools/Github/ParseServiceContactsList.ps1 to locate the YamlDotNet.dll based on the new package directory structure defined by the pipeline, using the agent's temp directory and explicit versioning.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings March 6, 2026 09:32
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

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

Refactors the pipeline and script to install YamlDotNet via a dedicated NuGet task and load the DLL from a deterministic packages directory under the agent temp folder.

Changes:

  • Replaced PowerShell-based Install-Package with NuGetCommand@2 (custom install) in the pipeline.
  • Passed YAMLDOTNETVERSION into the parsing script and updated the script to resolve YamlDotNet.dll from $(Agent.TempDirectory)/packages.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tools/Github/ParseServiceContactsList.ps1 Updates DLL discovery to align with the new NuGet install output directory/versioned folder.
.azure-pipelines/sync-aliases.yml Installs YamlDotNet using NuGetCommand@2 and exports version info for the script.

Comment thread tools/Github/ParseServiceContactsList.ps1
Comment thread tools/Github/ParseServiceContactsList.ps1
@vidai-msft vidai-msft merged commit 4ab153e into main Mar 9, 2026
17 checks passed
@vidai-msft vidai-msft deleted the vidai/sync-alias branch March 9, 2026 01:52
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.

3 participants