Repository navigation
Fix native Windows builds failing to find .NET SDK 10.0.108 - #4089
Merged
Merged
Conversation
The UseDotNet@2 task was previously only in the managed builds section (not(startsWith(name, 'native_'))). After PR #4055 bumped the SDK to 10.0.108, native Windows builds fail because the agents only have 10.0.101 pre-installed and global.json requires >= 10.0.108 with rollForward: latestFeature. macOS agents happen to have 10.0.300 which satisfies latestFeature, but Windows agents only have 10.0.101 in the 1xx band. Move the SDK install, Linux patch, and dotnet --info steps to a new top-level block that runs for both native and managed builds. Keep workload installation in the managed-only section since native builds don't need workloads. Co-authored-by: Copilot <[email protected]>
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4089PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4089"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4089/packages --name skiasharp-pr-4089More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4089 |
Contributor
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
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
After #4055 bumped the SDK to 10.0.108, native Windows builds fail at the "Restore the .NET tools" step because:
UseDotNet@2task was only in the managed builds section (not(startsWith(name, 'native_')))global.jsonrequires >= 10.0.108 withrollForward: latestFeatureFix
Move the .NET SDK installation (
UseDotNet@2, Linux dotnet patch, anddotnet --info) to a common section that runs for both native and managed builds. Workload installation stays in the managed-only section since native builds don't need workloads.