Repository navigation
Align AI.ML sample version with WindowsAppSDK.ML wrapper - #677
Open
v-goradojcic wants to merge 1 commit into
Open
v-goradojcic wants to merge 1 commit into
v-goradojcic wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates UpdateVersions.ps1 so managed WindowsML samples pin Microsoft.Windows.AI.MachineLearning to the minimum required by the resolved Microsoft.WindowsAppSDK.ML wrapper during validation builds, preventing NU1605 while keeping the committed public baseline unchanged for normal use.
Changes:
- Read the resolved
Microsoft.WindowsAppSDK.MLwrapper.nuspecto determine theMicrosoft.Windows.AI.MachineLearningdependency lower bound. - Override the harvested AI.ML version used for sample version rewriting with that floor when available.
- Add logging and error handling for nuspec parsing.
| File | Description |
|---|---|
| UpdateVersions.ps1 | Derives AI.ML minimum version from the resolved ML wrapper nuspec and uses it when rewriting sample package versions for validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| $mlWrapperNuspec = Join-Path $mlWrapperFolder "$mlWrapperId.nuspec" | ||
| if (Test-Path $mlWrapperNuspec) { | ||
| try { | ||
| [xml]$mlWrapperXml = Get-Content -Path $mlWrapperNuspec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
UpdateVersions.ps1updates package versions when the Samples are validated against an experimental WindowsAppSDK build, butMicrosoft.Windows.AI.MachineLearningis not currently updated.The managed WindowsML samples therefore keep their committed public baseline version (
2.3.42) even when the resolvedMicrosoft.WindowsAppSDK.MLwrapper declares a higher AI.ML minimum.This causes
NU1605during AggregatorBuildSampleApps.Fix
Use the already-resolved
Microsoft.WindowsAppSDK.MLpackage version from the existing package-version harvest, locate that exact wrapper nuspec, read itsMicrosoft.Windows.AI.MachineLearningdependency lower bound, and use that value when rewriting the Samples package versions for validation.The committed Samples version remains unchanged for normal/public use.
Validation
Microsoft.WindowsAppSDK.ML 2.5.62-devnuspec.2.3.42 -> 2.5.62-dev.[2.5.77-rc, 3.0.0)rewrites to2.5.77-rc.