-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Implement RID-specific tool packages for Microsoft.NETCore.ILAsm and ILDAsm #121282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Implement RID-specific tool packages for Microsoft.NETCore.ILAsm and ILDAsm #121282
Conversation
Co-authored-by: jcouv <[email protected]>
Co-authored-by: jcouv <[email protected]>
Co-authored-by: jcouv <[email protected]>
| @@ -0,0 +1,167 @@ | |||
| // Licensed to the .NET Foundation under one or more agreements. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wrapper should not be needed.
Instead, we should create RID specific tool packages - https://github.com/dotnet/designs/blob/main/accepted/2025/rid-specific-tool-packages.md .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - I'll update the implementation to use RID-specific tool packages instead of a managed wrapper. This will eliminate the wrapper and directly use the native ilasm binary as the entry point with the executable runner type as described in the design document.
|
@copilot src/coreclr/tools/dotnet-ilasm/dotnet-ilasm.csproj:6 Could we instead use .NET 6.0 as TargetFramework and the RollForward attribute, as explained in https://andrewlock.net/using-and-authoring-dotnet-tools/#ensuring-compatibility-by-multi-targeting ? #Closed |
Since we're switching to RID-specific tool packages based on @jkotas's feedback, there won't be a managed wrapper anymore - the native ilasm binary will be the entry point directly. The target framework concern will no longer apply. #Closed |
…kages Co-authored-by: jcouv <[email protected]>
|
@copilot Please proceed with the next steps you listed |
Co-authored-by: jcouv <[email protected]>
Implemented RID-specific tool packages in commit 5b66f25. The solution:
The packages can now be installed with |
|
Should ildasm be also packed as tool? ps - it's sad that single package doesn't support multiple commands dotnet/sdk#16708, otherwise we could have |
src/coreclr/.nuget/Microsoft.NETCore.ILAsm/DotnetToolSettings.primary.xml
Outdated
Show resolved
Hide resolved
|
/azp list |
This comment was marked as outdated.
This comment was marked as outdated.
|
/azp run runtime-coreclr ilasm |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
…4343-adba-5ef567bc9850
|
/azp help |
This comment was marked as outdated.
This comment was marked as outdated.
Looks like build artifacts do not include nupkg. @akoeplinger, @jkoritzinsky, any idea how to include nupkg artifacts during the CI run in PR pipelines? |
|
I don't believe we publish them at all in any public PR leg. We produce them but don't upload them. |
|
Ah, I remember once someone ran official leg against one of my PR to compare the contents of a nupkg before/after. Probably could try running it against this PR? |
|
dotnet/runtime CI does not exercise packages. VMR (dotnet/dotnet) is where the packages are built and where the official builds moved to. If you would like to get the packages build by the CI, you can port this change into a PR in dotnet/dotnet. It is probably a good idea anyway to make sure that this change does not break the VMR builds. |
|
I was able to build and validate the package with Jeremy's tip to use codespace. I'll do VMR next. For the record, my validation notesI built with `./build.sh clr -c Release` (since `./build.sh clr.iltools+clr.packages -c Release` failed by itself) Then I was able to install and use the tool (shown below).I also inspected the unzipped RID-specific package manually: And same for the primary package: |
|
@copilot Expand this PR to do the same for ILDasm |
src/coreclr/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
Outdated
Show resolved
Hide resolved
Co-authored-by: jcouv <[email protected]>
Added ILDAsm tool package support in 24646d1. The implementation follows the same pattern as ILAsm:
Both tools can now be installed as:
|
Copied the modified files over to dotnet/dotnet in PR dotnet/dotnet#3262 |
src/coreclr/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Adeel Mujahid <[email protected]>
|
The VMR build failed: There was a similar problem with some other consumers (copied below). Did some digging to understand how these project reference ILAsm packages:
|
Status: Implementation Complete ✅
Successfully implemented RID-specific tool packages for both Microsoft.NETCore.ILAsm and Microsoft.NETCore.ILDAsm following the design at https://github.com/dotnet/designs/blob/main/accepted/2025/rid-specific-tool-packages.md.
Implementation
Package Configuration (both
ILAsm.pkgprojandILDAsm.pkgproj)DotnetToolpackage typetools/net10.0/<rid>/$(PackageVersion)substitutionTool Manifests
DotnetToolSettings.xml- RID-specific package manifest withexecutablerunner type$(PackageVersion)Exclude="@(_OfficialRID)"patternPackage Description
dotnet tool installwith package nameSupported RIDs
Package Structure
Primary Packages (
Microsoft.NETCore.ILAsmandMicrosoft.NETCore.ILDAsm):RID-Specific Packages (e.g.,
runtime.linux-x64.Microsoft.NETCore.ILAsm):RID-Specific Packages (e.g.,
runtime.linux-x64.Microsoft.NETCore.ILDAsm):Benefits
executablerunner typeVerification
ILAsm:
✅ Packages built successfully
✅ Tool installed:
dotnet tool install -g Microsoft.NETCore.ILAsm✅ Tool invoked successfully:
ilasm✅ Manifest includes all supported RIDs including FreeBSD
✅ Package description includes usage examples
ILDAsm:
✅ Packages built successfully
✅ Tool installed:
dotnet tool install -g Microsoft.NETCore.ILDAsm✅ Tool invoked successfully:
ildasm✅ Manifest includes all supported RIDs including FreeBSD
✅ Package description includes usage examples
Usage
ILAsm
ILDAsm
Building Locally
Packages will be in:
artifacts/packages/Release/Shipping/Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.