Skip to content

Merge main into release/dnup to allow 'backflow' of dotnetup usage in ci into sdk main#54586

Merged
nagilson merged 838 commits into
dotnet:release/dnupfrom
nagilson:nagilson-nagilson-main-into-dotnetup-for-dotnetup-in-main-ci
Jun 4, 2026
Merged

Merge main into release/dnup to allow 'backflow' of dotnetup usage in ci into sdk main#54586
nagilson merged 838 commits into
dotnet:release/dnupfrom
nagilson:nagilson-nagilson-main-into-dotnetup-for-dotnetup-in-main-ci

Conversation

@nagilson

@nagilson nagilson commented Jun 3, 2026

Copy link
Copy Markdown
Member

The only code change of substance in the merge commit is the changes to restore-toolset (.sh and .ps1) where the SDK got a change to support cross-arch scenarios.
I've seen this issue with uname before in the .NET Install Tool.

Futher fixes applied:

  1. fix get-dotnetup to include the changes from main about rosetta arm64 on x64 to download the correct binary in these cases. (dotnetup installs based on the architecture of the binary so this should allow it to work.)
  2. only download the .net install script if it is needed as a fallback, not every time in CI.
  3. Also now downloads the arcade runtime version requirements, so that the install script is never even downloaded and it can all be done concurrently. (currently, 11.0.0-preview.6.26277.111, which was not downloaded by us until now.)
image

This is a refresh of #54330 which I handled manually.

Copilot AI and others added 30 commits May 12, 2026 23:56
Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/a9c4bb5a-f14d-43b3-9cf2-9a0812277758

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/ffdf1ae7-acd4-4804-a4b9-ddabf55f3c25

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
- ToolAlreadyInstalled: Now shows version in message (was passing version but not using it)
- UpdateSucceededPreVersionNoChange: Now shows both old and new versions (from version 'X' to version 'Y')
- UpdateSucceededStableVersionNoChange: Now shows both old and new versions (from version 'X' to version 'Y')
- Update ToolInstallGlobalOrToolPathCommand.cs to pass oldPackage.Version to the no-change messages
- Update XLF localization files

Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/ffdf1ae7-acd4-4804-a4b9-ddabf55f3c25

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
…rom/to versions

Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/ffdf1ae7-acd4-4804-a4b9-ddabf55f3c25

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
…edStableVersionNoChange

These two string resources and the else branch in PrintSuccessMessage that used
them were unreachable code.

Investigation: commit 4a4823d ("Avoid reinstall tool already installed",
Jun 2024, fixing dotnet#40818) introduced an early-return path in ExecuteInstallCommand
that checks whether the best-matching NuGet version equals the already-installed
version. When they match, the command returns 0 immediately with the
ToolAlreadyInstalled message, before ever reaching the TransactionalAction block
where PrintSuccessMessage is called. As a result, the else branch in
PrintSuccessMessage (oldPackage.Version == newInstalledPackage.Version) can never
be entered, because any same-version case is always handled by the early return.
The test that previously verified these strings was also removed in that same commit.

Removed:
- UpdateSucceededPreVersionNoChange resource string and translations
- UpdateSucceededStableVersionNoChange resource string and translations
- The unreachable else branch in PrintSuccessMessage
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/a39b15f7-8c57-4a87-a328-a2096b3ebd55

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Reset patterns:
- global.json
- NuGet.config
- eng/Version.Details.xml
- eng/Version.Details.props
- eng/common/*
… merge/release/9.0.3xx-to-release/10.0.1xx
…0260513.1

On relative base path root
Microsoft.TemplateEngine.Abstractions From Version 9.0.315 -> To Version 9.0.315
Microsoft.TemplateEngine.Mocks From Version 9.0.315-servicing.26256.5 -> To Version 9.0.315-servicing.26263.1
## Context

The `ShowPreviewMessage` task was migrated to support multithreaded execution
under MSBuild's `IMultiThreadableTask` model.

## Changes Made

### ShowPreviewMessage.cs
- Hardened the "preview SDK" message guard against concurrent execution by
  multiple task instances:
 - Added a fast-path `GetRegisteredTaskObject` check before taking any lock.
 - Wrapped the registration in a static lock with a double-checked
    `GetRegisteredTaskObject` call so the message is logged and the marker
    object is registered exactly once per build, even when several
    `ShowPreviewMessage` instances run in parallel.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Veronika Ovsyannikova <veronikao@microsoft.com>
…xists in `dotnet-tools.json` but not yet restored (dotnet#53658)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: SimonZhao888 <133954995+SimonZhao888@users.noreply.github.com>
…var (off by default)

Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/4410288e-02ec-4788-8c5b-5220bb7d3c67

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
…4194-ba9e-ac3349a970b0

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Updated Dependencies:
Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal, Microsoft.CodeAnalysis.Razor.Tooling.Internal, Microsoft.NET.Sdk.Razor.SourceGenerators.Transport (Version 10.0.0-preview.26230.116 -> 10.4.0-preview.26263.113)
Microsoft.Build (Version 18.7.1 -> 18.7.0-preview-26263-113)
Microsoft.Build.Localization (Version 18.7.1-servicing-26230-116 -> 18.7.0-preview-26263-113)
Microsoft.Build.NuGetSdkResolver, NuGet.Build.Tasks, NuGet.Build.Tasks.Console, NuGet.Build.Tasks.Pack, NuGet.CommandLine.XPlat, NuGet.Commands, NuGet.Common, NuGet.Configuration, NuGet.Credentials, NuGet.DependencyResolver.Core, NuGet.Frameworks, NuGet.LibraryModel, NuGet.Localization, NuGet.Packaging, NuGet.ProjectModel, NuGet.Protocol, NuGet.Versioning (Version 7.7.0-rc.23116 -> 7.7.0-rc.26413)
Microsoft.Build.Tasks.Git, Microsoft.SourceLink.AzureRepos.Git, Microsoft.SourceLink.Bitbucket.Git, Microsoft.SourceLink.Common, Microsoft.SourceLink.GitHub, Microsoft.SourceLink.GitLab (Version 10.0.400-alpha.26230.116 -> 10.0.400-alpha.26263.113)
Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.BuildClient, Microsoft.CodeAnalysis.CSharp, Microsoft.CodeAnalysis.CSharp.CodeStyle, Microsoft.CodeAnalysis.CSharp.Features, Microsoft.CodeAnalysis.CSharp.Workspaces, Microsoft.CodeAnalysis.ExternalAccess.HotReload, Microsoft.CodeAnalysis.PublicApiAnalyzers, Microsoft.CodeAnalysis.Workspaces.Common, Microsoft.CodeAnalysis.Workspaces.MSBuild, Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost, Microsoft.Net.Compilers.Toolset, Microsoft.Net.Compilers.Toolset.Framework (Version 5.6.0-2.26230.116 -> 5.8.0-1.26263.113)
Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Build.Tasks.Workloads, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.SignTool, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 10.0.0-beta.26230.116 -> 10.0.0-beta.26263.113)
Microsoft.FSharp.Compiler (Version 15.2.300-servicing.26230.116 -> 15.2.400-servicing.26263.113)
Microsoft.NET.Test.Sdk, Microsoft.TestPlatform.Build, Microsoft.TestPlatform.CLI (Version 18.7.0-release-26230-116 -> 18.7.0-release-26263-113)
Microsoft.TemplateEngine.Abstractions, Microsoft.TemplateEngine.Authoring.TemplateVerifier, Microsoft.TemplateEngine.Edge, Microsoft.TemplateEngine.Mocks, Microsoft.TemplateEngine.Orchestrator.RunnableProjects, Microsoft.TemplateEngine.TestHelper, Microsoft.TemplateEngine.Utils, Microsoft.TemplateSearch.Common, Microsoft.TemplateSearch.TemplateDiscovery (Version 10.0.400-preview.26230.116 -> 10.0.400-preview.26263.113)
[[ commit created by automation ]]
Reset patterns:
- global.json
- NuGet.config
- eng/Version.Details.xml
- eng/Version.Details.props
- eng/common/*
… merge/release/9.0.3xx-to-release/10.0.1xx
Updated Dependencies:
Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal, Microsoft.CodeAnalysis.Razor.Tooling.Internal, Microsoft.NET.Sdk.Razor.SourceGenerators.Transport (Version 10.4.0-preview.26263.113 -> 10.4.0-preview.26264.101)
Microsoft.Build, Microsoft.Build.Localization (Version 18.7.0-preview-26263-113 -> 18.7.0-preview-26264-101)
Microsoft.Build.NuGetSdkResolver, NuGet.Build.Tasks, NuGet.Build.Tasks.Console, NuGet.Build.Tasks.Pack, NuGet.CommandLine.XPlat, NuGet.Commands, NuGet.Common, NuGet.Configuration, NuGet.Credentials, NuGet.DependencyResolver.Core, NuGet.Frameworks, NuGet.LibraryModel, NuGet.Localization, NuGet.Packaging, NuGet.ProjectModel, NuGet.Protocol, NuGet.Versioning (Version 7.7.0-rc.26413 -> 7.7.0-rc.26501)
Microsoft.Build.Tasks.Git, Microsoft.SourceLink.AzureRepos.Git, Microsoft.SourceLink.Bitbucket.Git, Microsoft.SourceLink.Common, Microsoft.SourceLink.GitHub, Microsoft.SourceLink.GitLab (Version 10.0.400-alpha.26263.113 -> 10.0.400-alpha.26264.101)
Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.BuildClient, Microsoft.CodeAnalysis.CSharp, Microsoft.CodeAnalysis.CSharp.CodeStyle, Microsoft.CodeAnalysis.CSharp.Features, Microsoft.CodeAnalysis.CSharp.Workspaces, Microsoft.CodeAnalysis.ExternalAccess.HotReload, Microsoft.CodeAnalysis.PublicApiAnalyzers, Microsoft.CodeAnalysis.Workspaces.Common, Microsoft.CodeAnalysis.Workspaces.MSBuild, Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost, Microsoft.Net.Compilers.Toolset, Microsoft.Net.Compilers.Toolset.Framework (Version 5.8.0-1.26263.113 -> 5.8.0-1.26264.101)
Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Build.Tasks.Workloads, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.SignTool, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 10.0.0-beta.26263.113 -> 10.0.0-beta.26264.101)
Microsoft.FSharp.Compiler (Version 15.2.400-servicing.26263.113 -> 15.2.400-servicing.26264.101)
Microsoft.NET.Test.Sdk, Microsoft.TestPlatform.Build, Microsoft.TestPlatform.CLI (Version 18.7.0-release-26263-113 -> 18.7.0-release-26264-101)
Microsoft.TemplateEngine.Abstractions, Microsoft.TemplateEngine.Authoring.TemplateVerifier, Microsoft.TemplateEngine.Edge, Microsoft.TemplateEngine.Mocks, Microsoft.TemplateEngine.Orchestrator.RunnableProjects, Microsoft.TemplateEngine.TestHelper, Microsoft.TemplateEngine.Utils, Microsoft.TemplateSearch.Common, Microsoft.TemplateSearch.TemplateDiscovery (Version 10.0.400-preview.26263.113 -> 10.0.400-preview.26264.101)
[[ commit created by automation ]]
@github-actions github-actions Bot added the sdk-diagnostic-docs-needed Indicates that a PR introduces new diagnostic codes, which must be documented over at dotnet/docs label Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

📋 SDK Diagnostic Documentation Reminder

This PR introduces 3 new SDK diagnostic codes:

  • NETSDK1238
  • NETSDK1239
  • NETSDK1240

Action Required

Please ensure that documentation for these diagnostics is added or updated in the dotnet/docs repository at:

Each diagnostic should have:

  • A clear description of the error/warning
  • Possible causes
  • Recommended solutions
  • Code examples where applicable

Thank you for helping keep our documentation up to date! 🙏

nagilson added 7 commits June 3, 2026 15:27
…ns; force redownload dotnetup in this case

this makes sure dotnetup matches the architecture - the get dotnetup script will respect this but there could be an artifact on the machine from a prior run if we don't check this.
…ackageVersion as well

I observed we still download the install script even though it is not necessary and these runtimes could also be acquired concurrently
…tch sdk pattern

AI attempt to fix :

/home/cloudtest/.nuget/packages/microsoft.testing.platform.msbuild/2.2.1/buildMultiTargeting/Microsoft.Testing.Platform.MSBuild.targets(263,5): error : Testing with VSTest target is no longer supported by Microsoft.Testing.Platform on .NET 10 SDK and later. If you use dotnet test, you should opt-in to the new dotnet test experience. For more information, see https://aka.ms/dotnet-test-mtp-error [/mnt/vss/_work/1/s/test/dotnetup.Tests/dotnetup.Tests.csproj]
@nagilson nagilson marked this pull request as ready for review June 3, 2026 23:23
Copilot AI review requested due to automatic review settings June 3, 2026 23:23
@nagilson nagilson requested a review from a team as a code owner June 3, 2026 23:23

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@nagilson

nagilson commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@dsplaisted dsplaisted left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread eng/restore-toolset.ps1 Outdated
Comment thread eng/restore-toolset.ps1
Comment thread eng/pipelines/templates/jobs/dotnetup/dotnetup-tests.yml
nagilson added 2 commits June 4, 2026 10:31
I actually think it's incorrect that the install script version provided is 9.0.0, but this is what https://github.com/dotnet/sdk/blob/main/eng/restore-toolset.ps1 main is doing so I'm going to leave it for parity. I'm guessing that they install the .0.0 version simply because they don't want  to have to resolve the latest major.minor version, but dotnetup can easily do that, and since runtime changes aren't supposed to be breaking this seems like the secure, correct thing to do.
assumption:

dotnetup does not support --arch

helix target queue arch is arm64 but the actual machine running is x64

the actual machine can no longer run x64
@nagilson

nagilson commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

Checked that there's no contention merging on red and got the OK:

The Mac (arm64) leg is still failing but I don't think it's related to my changes anymore:

  1. The failure now is not a bad architecture failure, but AddReferenceParserTests this test expecting the test folder name to not to change (lazy value) - filing an issue...

  2. The Linux failure is an Aspire flaky test

  3. If you ask copilot, it may think it is still an issue at first because the helix failure log shows a message, The library 'libhostpolicy.dylib' required to execute the application was not found - HOWEVER, this appears to be an intentional failure output and even shows up in a passing CI for Mac Arm 64, such as this passing job: helixr1107v0xdeko0k025g8.blob.core.windows.net/dotnet-sdk-refs-heads-main-8ca8d92074a4422691/dotnet… from Pipelines - Run 20260604.6 logs. Here is the failing job in the dotnetup run: helixr1107v0xdeko0k025g8.blob.core.windows.net/dotnet-sdk-refs-pull-54586-merge-7dca410f43cb436986/…

@nagilson nagilson merged commit 96b0199 into dotnet:release/dnup Jun 4, 2026
26 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-diagnostic-docs-needed Indicates that a PR introduces new diagnostic codes, which must be documented over at dotnet/docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.