Skip to content

Produce AOT, Runtime Specific, Cross Build Executables of dotnetup#53143

Merged
nagilson merged 32 commits intodotnet:release/dnupfrom
nagilson:nagilson-dnup-executables
Mar 17, 2026
Merged

Produce AOT, Runtime Specific, Cross Build Executables of dotnetup#53143
nagilson merged 32 commits intodotnet:release/dnupfrom
nagilson:nagilson-dnup-executables

Conversation

@nagilson
Copy link
Copy Markdown
Member

@nagilson nagilson commented Feb 24, 2026

For:
#52350
#51585
Also resolves #53073 by making tests use the native aot version of dotnetup.

https://dev.azure.com/dnceng/internal/_build?definitionId=1544&_a=summary

Changes include:

  • The build now produces an executable of dotnetup
  • The tests run on the Native AOT version of dotnetup
  • The built executable of dotnetup is cross built so it is compatible with older linux versions
  • The CI now uses arm64 mac for the tests where as before it was actually x64

Does not include:

  • Signing of dotnetup executables
  • Publishing of dotnetup executables / a place to acquire them
  • There is a bug with the .NET SDK where satellite language resources files are still generated even if publish single file is true so there are unneeded publish outputs which is not fixed here.

@nagilson
Copy link
Copy Markdown
Member Author

nagilson commented Mar 9, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/Installer/dotnetup/.vscode/launch.json Outdated
Comment thread src/Installer/installer.code-workspace Outdated
Comment thread src/Installer/Microsoft.Dotnet.Installation/Internal/VersionSanitizer.cs Outdated
@nagilson
Copy link
Copy Markdown
Member Author

Seems good, just need to get the linux executables working because the cross build container is out of disk space

@nagilson
Copy link
Copy Markdown
Member Author

nagilson commented Mar 11, 2026

The first time I tried to run the standalone exe it hung - then it failed due to a 'corrupt' manifest ( different manifest versions on my dev machine) - should probably audit. This also makes me want to change the walkthrough.

xml is also being produced standalone.

I couldnt find a way to exclude this file and we don't care about this file - it shouldn't be migrated into main though
@nagilson nagilson marked this pull request as ready for review March 12, 2026 19:31
@nagilson nagilson requested a review from a team as a code owner March 12, 2026 19:31
Copilot AI review requested due to automatic review settings March 12, 2026 19:31
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

This PR updates the dotnetup build/test/dev workflow to prefer NativeAOT-published binaries where available, and expands CI to publish AOT executables across multiple RIDs while separating “style-check” from bootstrap builds.

Changes:

  • Update dotnetup test utilities to locate and run an AOT-published dotnetup binary (with managed fallback).
  • Add CI stages/templates to publish dotnetup executables for multiple RIDs and add a dedicated style-check stage.
  • Adjust installer/dotnetup interop and build properties (mutex robustness, P/Invoke attributes, analyzer enforcement, test runtime install gating).

Reviewed changes

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

Show a summary per file
File Description
test/dotnetup.Tests/Utilities/DotnetupTestUtilities.cs Search for AOT publish output first (then managed output) when locating dotnetup.
test/dotnetup.Tests/DnupE2Etest.cs Clarify DOTNET_ROOT behavior when running managed vs AOT dotnetup.
src/Installer/Microsoft.Dotnet.Installation/Microsoft.Dotnet.Installation.csproj Suppress SYSLIB1054 and relax style/code-analysis enforcement during bootstrap builds.
src/Installer/Microsoft.Dotnet.Installation/Internal/ScopedMutex.cs Increase mutex timeout and handle AbandonedMutexException as success.
src/Installer/Microsoft.Dotnet.Installation/Internal/HostFxrWrapper.cs Add unmanaged calling convention annotation for LoadLibraryExW.
src/Installer/installer.code-workspace VS Code workflow improvements (target framework input; publish-aot preLaunchTask).
src/Installer/dotnetup/WindowsPathHelper.cs Adjust LibraryImport signature/marshalling for SendMessageTimeout.
src/Installer/dotnetup/Telemetry/TelemetryCommonProperties.cs Refactor dev-build detection to share env-var logic between configs.
src/Installer/dotnetup/dotnetup.csproj Disable code-style enforcement and CA warnings-as-errors during bootstrap builds.
src/Installer/dotnetup/.vscode/launch.json Add target framework input to avoid hardcoding net10.0 in debug path.
eng/restore-toolset.sh Allow skipping shared framework installs via DOTNET_INSTALL_TEST_RUNTIMES=false.
eng/restore-toolset.ps1 Allow skipping shared framework installs via DOTNET_INSTALL_TEST_RUNTIMES=false.
eng/pipelines/templates/jobs/dotnetup/dotnetup-tests.yml Publish dotnetup AOT before running tests; add disk cleanup step on Unix.
eng/pipelines/templates/jobs/dotnetup/dotnetup-library-package.yml Disable code-style enforcement for the library package build leg.
eng/pipelines/templates/jobs/dotnetup/dotnetup-executables.yml New template to publish per-RID AOT executables and publish artifacts/binlogs.
documentation/manpages/tool/run_docker.sh Change docker build to use an explicit Dockerfile path.
documentation/manpages/tool/Dockerfile Remove the previous manpage-tool Dockerfile.
.vsts-dnup-pr.yml Narrow restore scope; enforce CA warnings-as-errors in the warn-as-error leg; add executable build stage.
.vsts-dnup-ci.yml Add style-check stage and per-RID executable publish stages; define cross-build containers.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread test/dotnetup.Tests/Utilities/DotnetupTestUtilities.cs
Comment thread src/Installer/dotnetup/WindowsPathHelper.cs Outdated
Comment thread documentation/manpages/tool/run_docker.sh Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread documentation/manpages/tool/Dockerfile
Comment thread documentation/manpages/tool/run_docker.sh Outdated
@nagilson nagilson requested a review from dsplaisted March 12, 2026 19:42
also add a timeout to bootstrap toolset at the beginning so it fails if its been more than 10 min - running out of disk space seems to make it take 1.5 hr to fail
Comment thread eng/pipelines/templates/jobs/dotnetup/dotnetup-tests.yml Outdated
Comment thread test/dotnetup.Tests/Utilities/DotnetupTestUtilities.cs Outdated
Comment thread test/dotnetup.Tests/Utilities/DotnetupTestUtilities.cs Outdated
@nagilson nagilson requested a review from dsplaisted March 12, 2026 23:50
@nagilson nagilson changed the title Try to publish executables of dotnetup Produce AOT, Runtime Specific, Cross Build Executables of dotnetup Mar 13, 2026
this seems to happen a lot if other tasks can run simultaneously on that image ?
@nagilson nagilson enabled auto-merge March 13, 2026 19:22
@nagilson nagilson requested a review from a team March 13, 2026 19:22
Copy link
Copy Markdown
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

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

I don't follow all of the AzDO pipelines yaml, but looks good.

Comment thread test/dotnetup.Tests/Utilities/DotnetupTestUtilities.cs Outdated
Comment thread test/dotnetup.Tests/Utilities/DotnetupTestUtilities.cs
Comment thread .vsts-dnup-pr.yml Outdated
@nagilson nagilson disabled auto-merge March 17, 2026 16:43
@nagilson nagilson merged commit 4da60e0 into dotnet:release/dnup Mar 17, 2026
24 of 31 checks passed
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