Skip to content

Fix nightly test restore with Central Package Management - #7721

Open
rosebyte wants to merge 1 commit into
dotnet:mainfrom
rosebyte:fix/nightly-cpm-restore
Open

rosebyte wants to merge 1 commit into
dotnet:mainfrom
rosebyte:fix/nightly-cpm-restore

Conversation

@rosebyte

Copy link
Copy Markdown
Member

Fixes NU1010 when restoring Microsoft.ML.NightlyBuild.Tests or the full solution.

The Central Package Management conversion removed the placeholder versions from the nightly package references without adding corresponding PackageVersion items. This caused solution restore, including restore initiated by C# Dev Kit, to fail.

Changes

  • Add placeholder PackageVersion items for the nightly-build dependencies.
  • Add the placeholder Microsoft.ML package version used by TestFrameworkDependency.props.
  • Update Microsoft.ML.NugetPackageVersionUpdater to rewrite PackageVersion items instead of PackageReference items.
  • Preserve the nightly pipeline behaviour, where placeholder versions are replaced with the latest nightly package versions.

Validation

  • Restored Microsoft.ML.NightlyBuild.Tests with ReferenceTypeForTestFramework=NuGet.
  • Restored the full Microsoft.ML.sln.
  • Built Microsoft.ML.NugetPackageVersionUpdater.
  • Verified that the updater replaces versions in both dependency props files.

Copilot AI lite review requested due to automatic review settings September 17, 2026 11:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

All reviewed changes address the restore issue and preserve expected nightly behavior.

Pull request overview

Fixes Central Package Management restore failures for nightly tests and the full solution while preserving nightly version replacement behavior.

Changes:

  • Adds placeholder PackageVersion entries for nightly and test framework dependencies.
  • Updates the nightly package version updater to modify PackageVersion items.
File summaries
File Description
test/TestFrameworkDependency.props Adds the Microsoft.ML placeholder version.
test/NightlyBuildDependency.props Adds placeholder versions for nightly dependencies.
test/Microsoft.ML.NugetPackageVersionUpdater/Program.cs Updates central package versions during nightly builds.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants