Skip to content

Package managed ilasm using SDK NuGet infrastructure - #136547

Merged
jkoritzinsky merged 12 commits into
dotnet:mainfrom
jkoritzinsky:dev/jkoritzinsky/managed-ilasm-nuget-packaging
Oct 30, 2026
Merged

jkoritzinsky merged 12 commits into
dotnet:mainfrom
jkoritzinsky:dev/jkoritzinsky/managed-ilasm-nuget-packaging

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

Switch the existing ILAsm NuGet packages to managed ilasm, then migrate their
pack ownership to the SDK without changing the consumer package IDs or native
asset paths.

Ordered phase checkpoints

  1. eb5ed0ea244: retain pkgproj packaging and replace its payload with published
    managed ilasm. Add ilasm_inbuild.csproj for host packages, following the
    crossgen2 inbuild single-file/R2R pattern.
  2. 5a183c36758: move RID-specific SDK packaging into the ilasm projects,
    including published symbols. Retain the pkgproj lineup at this checkpoint.
    Include package production in the tools.ilasm subset and existing CI.
  3. e72d13142f7: replace the lineup pkgproj with an SDK NoTargets package
    project, reusing the shared official RID definitions and runtime.json
    generation. Preserve identity-package leg selection and additional host
    packages.

Package-layout comparison

Retained and compared actual phase-1 pkgproj archives against phases 2 and 3:
18 archives per phase across win-x64, win-x86, win-arm64, and an ARM64 target
build producing a separate win-x64 host package. Payload/resource entry paths,
symbol paths, Windows ZIP attributes, package identity/contract metadata and PE
architectures match. The final lineup's runtime.json is byte-identical to phase
1, including all 19 default RID mappings and dependency ranges. No new framework,
ILAssembler, System.CommandLine, or build-task dependencies are exposed.

Accounted differences: generated core-property UUIDs/relationship IDs and NuGet
generator version; real SDK repository revision/branch metadata; omission of
obsolete nuspec owners and explicit false license-acceptance metadata. Rebuilt
executable/PDB bytes differ; this is a layout/contract comparison, not a claim of
bit-identical codegen. SDK symbol archives are emitted beside regular packages
instead of the legacy symbols output subdirectory.

Validation

  • Clean baseline: .\dotnet.cmd msbuild src\tools\ilasm\src\ilasm\ilasm.csproj -restore -t:Publish -p:Configuration=Release -p:NuGetAudit=false — passed.
  • All three phases: .\.dotnet\dotnet.exe msbuild src\coreclr\.nuget\Microsoft.NETCore.ILAsm\Microsoft.NETCore.ILAsm.proj -restore -t:Pack -p:Configuration=Release -p:NuGetAudit=false -p:TargetArchitecture=<x64|x86|arm64> -p:PackageOutputPath=<phase-specific-directory> — passed, with matching per-target restores before phase-1 packaging.
  • Host packaging: the same Pack command with -p:TargetArchitecture=arm64 -p:BuildHostILTools=true — passed in all phases.
  • .\build.cmd tools.ilasm -c Release -test /p:NuGetAudit=false — passed after phases 2 and 3; 5,578 tests total, 5,575 passed, 3 existing skips, no failures/errors.
  • Extracted phase-1 and final x64/x86/host executables: --help and assembly of a minimal IL DLL — passed.
  • Isolated local-feed consumer restore with .\.dotnet\dotnet.exe restore <Consumer.csproj> --configfile <local-feed-config> -p:RuntimeIdentifier=<win-x64|win-x86|win-arm64> — passed; each selects exactly its RID package through the lineup.
  • Identity-package suppression, shared RID-list parity (default, Windows-only, custom RID), archive comparisons, and git diff --check — passed.

Validation is Windows-only, as requested. ARM64 was cross-built, not executed.
Linux/macOS/community-platform production, Unix executable modes, bootstrap
source-build packs and official signing/release legs are unverified. All legacy
advertised RIDs remain; availability of compatible packs/toolchains for every
legacy platform is not established by this PR's local validation. Publish/restore
failures are not hidden by native fallbacks or synthetic payloads.

Note

This pull request was generated with GitHub Copilot.

jkoritzinsky and others added 3 commits October 27, 2026 14:20
Publish RID payloads from managed ilasm and use a separate host single-file project for cross-component packages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retain the pkgproj lineup while moving RID payload and symbol packaging to the publishing projects; integrate the tools subset and CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Share the existing official RID definitions, generate the same runtime.json, and preserve identity-leg and host-tool selection without pkgproj packaging.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky
jkoritzinsky marked this pull request as draft October 27, 2026 21:48
Select ilasm projects directly through tools.ilasm, implied by clr.tools, and generate the lineup runtime graph without the legacy packaging package.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@am11

am11 commented Oct 28, 2026

Copy link
Copy Markdown
Member

Tested on openbsd and found some gaps (even in main), fixed in #136571.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jkoritzinsky
jkoritzinsky marked this pull request as ready for review October 28, 2026 18:30
@jkoritzinsky
jkoritzinsky requested review from jkotas and a balanced review from Copilot October 28, 2026 18:30

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.

🟡 Changes recommended

Unresolved regressions cause duplicate or missing ILAsm packages across build configurations and break resource-enabled builds with the replacement managed tool.

4 open issues
What changed in this PR

This PR moves ILAsm NuGet packaging from legacy pkgproj infrastructure to SDK projects, using managed ilasm while retaining the existing package IDs and native asset paths.

Changes:

  • Adds shared SDK packaging settings and a separate host-tool publish project.
  • Replaces the legacy lineup package with a NoTargets project and runtime-graph generation task.
  • Integrates package production into build subsets and ILAsm CI.
File Description
src/​tools/​ilasm/​src/​ilasm/​ilasm.props Shares tool settings and packages published binaries and symbols.
src/​tools/​ilasm/​src/​ilasm/​ilasm.csproj Imports shared packaging settings.
src/​tools/​ilasm/​src/​ilasm/​ilasm_inbuild.csproj Adds single-file host-tool publishing.
src/​tasks/​installer.tasks/​installer.tasks.csproj References NuGet.Versioning for runtime-graph generation.
src/​tasks/​installer.tasks/​GenerateILAsmRuntimeGraph.cs Generates RID-specific package dependency mappings.
src/​coreclr/​.nuget/​pkgproj.props Imports the extracted shared RID definitions.
src/​coreclr/​.nuget/​package-rids.props Centralizes official and custom package RIDs.
src/​coreclr/​.nuget/​Microsoft.NETCore.ILAsm/​Microsoft.NETCore.ILAsm.proj Removes the legacy packaging traversal.
src/​coreclr/​.nuget/​Microsoft.NETCore.ILAsm/​Microsoft.NETCore.ILAsm.pkgproj Removes native ILAsm pkgproj packaging.
src/​coreclr/​.nuget/​Microsoft.NETCore.ILAsm/​Microsoft.NETCore.ILAsm.Package.csproj Adds SDK-based lineup packaging.
src/​coreclr/​.nuget/​coreclr-packages.proj Removes the legacy ILAsm project reference.
eng/​Subsets.props Selects managed ILAsm and packaging projects.
eng/​pipelines/​coreclr/​ilasm.yml Adds packaging triggers and enables CI packing.

Review effort: Balanced

Comment thread eng/Subsets.props Resolved
Comment thread eng/Subsets.props Resolved
Comment thread src/tools/ilasm/src/ilasm/ilasm.props Resolved
Comment thread src/coreclr/.nuget/package-rids.props Resolved
jkoritzinsky and others added 2 commits October 28, 2026 15:08
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
jkoritzinsky and others added 2 commits October 29, 2026 10:50
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Extract reusable NativeAOT tool packaging targets and simplify package metadata. Add package readmes, remove redundant task-host and platform settings, and rename the runtime dependency task source file.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
jkoritzinsky and others added 2 commits October 29, 2026 13:21
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread eng/Subsets.props Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jkoritzinsky
jkoritzinsky requested a review from jkotas October 29, 2026 21:46
@jkoritzinsky
jkoritzinsky enabled auto-merge (squash) October 29, 2026 21:52
@jkoritzinsky
jkoritzinsky merged commit 5ae6405 into dotnet:main Oct 30, 2026
239 checks passed
@github-project-automation github-project-automation Bot moved this to Done in AppModel Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants