Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 3, 2025

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.pkgproj and ILDAsm.pkgproj)

  • Configured as DotnetTool package type
  • RID-specific packages include native binaries in tools/net10.0/<rid>/
  • Primary packages dynamically generate tool manifest with $(PackageVersion) substitution
  • Hardcoded RID list to support distributed builds across multiple machines
  • TargetRid entry with Exclude pattern for automatic community platform support

Tool Manifests

  • DotnetToolSettings.xml - RID-specific package manifest with executable runner type
  • Primary manifest generated dynamically during build to use current $(PackageVersion)
  • Includes all supported RIDs including community platforms (FreeBSD)
  • Automatically includes $(TargetRid) using Exclude="@(_OfficialRID)" pattern

Package Description

  • Enhanced with clear usage examples showing dotnet tool install with package name
  • Shows tool invocation using tool name (ilasm/ildasm)
  • Clarifies distinction between package name and tool command name

Supported RIDs

  • Windows: win-x64, win-x86, win-arm64
  • Linux: linux-x64, linux-arm, linux-arm64, linux-musl-x64, linux-musl-arm64
  • macOS: osx-x64, osx-arm64
  • Community platforms: freebsd-x64, freebsd-arm64
  • Plus any $(TargetRid) not in the official list (automatically excluded if duplicate)

Package Structure

Primary Packages (Microsoft.NETCore.ILAsm and Microsoft.NETCore.ILDAsm):

tools/net10.0/any/DotnetToolSettings.xml (generated with RID list and current version)

RID-Specific Packages (e.g., runtime.linux-x64.Microsoft.NETCore.ILAsm):

tools/net10.0/linux-x64/DotnetToolSettings.xml
tools/net10.0/linux-x64/ilasm

RID-Specific Packages (e.g., runtime.linux-x64.Microsoft.NETCore.ILDAsm):

tools/net10.0/linux-x64/DotnetToolSettings.xml
tools/net10.0/linux-x64/ildasm

Benefits

  • ✅ Smaller downloads (only RID-specific package for current platform is downloaded)
  • ✅ No managed wrapper overhead - native binaries run directly
  • ✅ Native performance with executable runner type
  • ✅ Consistent with .NET tool packaging design
  • ✅ No hardcoded versions - automatically uses build system version
  • ✅ Works in distributed build environments (different RIDs on different machines)
  • ✅ Includes community platform support (FreeBSD)
  • Automatically supports new community RIDs via $(TargetRid) with simple Exclude pattern
  • ✅ Clear usage documentation in package descriptions
  • Simple, maintainable implementation following ILCompiler pattern
  • Both ILAsm and ILDAsm now available as dotnet tools

Verification

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

# Install the tool (uses package name)
dotnet tool install -g Microsoft.NETCore.ILAsm

# Invoke the tool (uses tool command name)
ilasm mycode.il -dll -output:myassembly.dll

# Get help on ilasm options
ilasm -?

ILDAsm

# Install the tool (uses package name)
dotnet tool install -g Microsoft.NETCore.ILDAsm

# Invoke the tool (uses tool command name)
ildasm myassembly.dll

# Get help on ildasm options
ildasm -?

Building Locally

# Build CoreCLR runtime and packages
./build.sh -subset clr.runtime+clr.packages -c Release

# Or build just the packages if runtime is already built
./build.sh -subset clr.packages -c Release

Packages will be in: artifacts/packages/Release/Shipping/

Original prompt

Update the ilasm package to publish ilasm a dotnet tool


💡 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.

Copilot AI self-assigned this Nov 3, 2025
Copilot AI changed the title [WIP] Update the ilasm package to publish ilasm a dotnet tool Add dotnet tool support to Microsoft.NETCore.ILAsm package Nov 3, 2025
Copilot AI requested a review from jcouv November 3, 2025 01:33
Copilot finished work on behalf of jcouv November 3, 2025 01:33
@@ -0,0 +1,167 @@
// Licensed to the .NET Foundation under one or more agreements.
Copy link
Member

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 .

Copy link
Contributor Author

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.

@jcouv
Copy link
Member

jcouv commented Nov 4, 2025

@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

Copy link
Contributor Author

Copilot AI commented Nov 4, 2025

@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-authori...

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

Copilot AI changed the title Add dotnet tool support to Microsoft.NETCore.ILAsm package [WIP] Investigate RID-specific tool packages for Microsoft.NETCore.ILAsm Nov 4, 2025
Copilot finished work on behalf of jcouv November 4, 2025 05:50
@jcouv
Copy link
Member

jcouv commented Nov 4, 2025

@copilot Please proceed with the next steps you listed

Copy link
Contributor Author

Copilot AI commented Nov 4, 2025

@copilot Please proceed with the next steps you listed

Implemented RID-specific tool packages in commit 5b66f25. The solution:

  • Creates RID-specific packages (e.g., runtime.linux-x64.Microsoft.NETCore.ILAsm) with native ilasm binary as direct entry point
  • Primary package (Microsoft.NETCore.ILAsm) includes tool manifest referencing all RID-specific packages
  • Uses executable runner type - no managed wrapper needed
  • Verified working: tool installs and executes ilasm successfully

The packages can now be installed with dotnet tool install -g Microsoft.NETCore.ILAsm and the native ilasm binary runs directly without any wrapper overhead.

Copilot AI changed the title [WIP] Investigate RID-specific tool packages for Microsoft.NETCore.ILAsm Implement RID-specific tool packages for Microsoft.NETCore.ILAsm Nov 4, 2025
Copilot finished work on behalf of jcouv November 4, 2025 08:41
@am11
Copy link
Member

am11 commented Nov 4, 2025

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 Microsoft.NETCore.ILTools with both ilasm and ildasm packed together.

@jcouv
Copy link
Member

jcouv commented Nov 6, 2025

/azp list

@azure-pipelines

This comment was marked as outdated.

@jcouv
Copy link
Member

jcouv commented Nov 6, 2025

/azp run runtime-coreclr ilasm

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@jcouv
Copy link
Member

jcouv commented Nov 6, 2025

/azp help

@azure-pipelines

This comment was marked as outdated.

@am11
Copy link
Member

am11 commented Nov 6, 2025

Do you know where I can find the packages in CI artifacts? I couldn't find them so far (nothing comes up when I search for "ilasm") :-/

Looks like build artifacts do not include nupkg. @akoeplinger, @jkoritzinsky, any idea how to include nupkg artifacts during the CI run in PR pipelines?

@jkoritzinsky
Copy link
Member

I don't believe we publish them at all in any public PR leg. We produce them but don't upload them.

@am11
Copy link
Member

am11 commented Nov 6, 2025

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?

@jkotas
Copy link
Member

jkotas commented Nov 6, 2025

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.

@jcouv
Copy link
Member

jcouv commented Nov 6, 2025

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 notes I 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).
@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ dir
Microsoft.NETCore.ILAsm.10.0.0-dev.nupkg   Microsoft.NET.Sdk.IL.10.0.0-dev.symbols.nupkg                symbols
Microsoft.NETCore.ILDAsm.10.0.0-dev.nupkg  runtime.linux-x64.Microsoft.NETCore.ILAsm.10.0.0-dev.nupkg
Microsoft.NET.Sdk.IL.10.0.0-dev.nupkg      runtime.linux-x64.Microsoft.NETCore.ILDAsm.10.0.0-dev.nupkg

@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ dotnet tool install --global Microsoft.NETCore.ILAsm --version 10.0.0-dev --add-source /workspaces/runtime/artifacts/packages/Release/Shipping/
You can invoke the tool using the following command: ilasm
Tool 'microsoft.netcore.ilasm' (version '10.0.0-dev') was successfully installed.

@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ ilasm


Usage: ilasm [Options] <sourcefile> [Options]

Options:
/NOLOGO         Don't type the logo
/QUIET          Don't report assembly progress
/NOAUTOINHERIT  Disable inheriting from System.Object by default
/DLL            Compile to .dll
/EXE            Compile to .exe (default)
/PDB            Create the PDB file without enabling debug info tracking
/APPCONTAINER   Create an AppContainer exe or dll
/DEBUG          Disable JIT optimization, create PDB file, use sequence points from PDB
/DEBUG=IMPL     Disable JIT optimization, create PDB file, use implicit sequence points
/DEBUG=OPT      Enable JIT optimization, create PDB file, use implicit sequence points
/DET            Produce deterministic outputs
/OPTIMIZE       Optimize long instructions to short
/FOLD           Fold the identical method bodies into one
/CLOCK          Measure and report compilation times
/OUTPUT=<targetfile>    Compile to file with specified name 
                        (user must provide extension, if any)
/KEY=<keyfile>      Compile with strong signature 
                        (<keyfile> contains private key)
/KEY=@<keysource>   Compile with strong signature 
                        (<keysource> is the private key source name)
/ANAME=<asmname>    Override the name of the compiled assembly
/INCLUDE=<path>     Set path to search for #include'd files
/SUBSYSTEM=<int>    Set Subsystem value in the NT Optional header
/SSVER=<int>.<int>  Set Subsystem version number in the NT Optional header
/FLAGS=<int>        Set CLR ImageFlags value in the CLR header
/ALIGNMENT=<int>    Set FileAlignment value in the NT Optional header
/BASE=<int>     Set ImageBase value in the NT Optional header (max 2GB for 32-bit images)
/STACK=<int>    Set SizeOfStackReserve value in the NT Optional header
/MDV=<version_string>   Set Metadata version string
/MSV=<int>.<int>   Set Metadata stream version (<major>.<minor>)
/PE64           Create a 64bit image (PE32+)
/HIGHENTROPYVA  Set High Entropy Virtual Address capable PE32+ images (default for /APPCONTAINER)
/NOCORSTUB      Suppress generation of CORExeMain stub
/STRIPRELOC     Indicate that no base relocations are needed
/X64            Target processor: 64bit AMD processor
/ARM            Target processor: ARM (AArch32) processor
/ARM64          Target processor: ARM64 (AArch64) processor
/32BITPREFERRED Create a 32BitPreferred image (PE32)

Key may be '-' or '/'
Options are recognized by first 3 characters (except ARM/ARM64)
Default source file extension is .il

Target defaults:
/PE64      => /PE64 /X64
/X64       => /PE64 /X64
/ARM64     => /PE64 /ARM64

@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ ildasm
bash: ildasm: command not found

I also inspected the unzipped RID-specific package manually:

@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ unzip  runtime.linux-x64.Microsoft.NETCore.ILAsm.10.0.0-dev.nupkg -d extracted-rid-ilasm/
Archive:  runtime.linux-x64.Microsoft.NETCore.ILAsm.10.0.0-dev.nupkg
  inflating: extracted-rid-ilasm/_rels/.rels  
  inflating: extracted-rid-ilasm/runtime.linux-x64.Microsoft.NETCore.ILAsm.nuspec  
  inflating: extracted-rid-ilasm/Icon.png  
  inflating: extracted-rid-ilasm/THIRD-PARTY-NOTICES.TXT  
  inflating: extracted-rid-ilasm/tools/net10.0/linux-x64/DotnetToolSettings.xml  
  inflating: extracted-rid-ilasm/tools/net10.0/linux-x64/ilasm  
  inflating: extracted-rid-ilasm/[Content_Types].xml  
  inflating: extracted-rid-ilasm/package/services/metadata/core-properties/665cff3617924d62a6fefdbee0f1eca6.psmdcp  
@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ more extracted-rid-ilasm/tools/net10.0/linux-x64/DotnetToolSettings.xml  
<?xml version="1.0" encoding="utf-8"?>
<DotNetCliTool Version="2">
  <Commands>
    <Command Name="ilasm" EntryPoint="ilasm" Runner="executable" />
  </Commands>
</DotNetCliTool>
@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ more extracted-rid-ilasm/package/services/metadata/core-properties/665cff3617924d62a6fefdbee0f1eca6.psmdcp  
<?xml version="1.0" encoding="utf-8"?>
<coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance" xmlns="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">
  <dc:creator>Microsoft</dc:creator>
  <dc:description>Internal implementation package not meant for direct consumption. Please do not reference directly. 
The .NET IL Assembler.

Usage:
  Install as a global tool:
    dotnet tool install -g Microsoft.NETCore.ILAsm

  Invoke the tool:
    ilasm [options] &lt;sourcefile&gt;

  For help on ilasm command-line options:
    ilasm -?</dc:description>
  <dc:identifier>runtime.linux-x64.Microsoft.NETCore.ILAsm</dc:identifier>
  <version>10.0.0-dev</version>
  <keywords></keywords>
  <lastModifiedBy>NuGet.Packaging, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;.NET 8.0</lastModifiedBy>
</coreProperties>
@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ more extracted-rid-ilasm/runtime.linux-x64.Microsoft.NETCore.ILAsm.nuspec 
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
  <metadata minClientVersion="2.12">
    <id>runtime.linux-x64.Microsoft.NETCore.ILAsm</id>
    <version>10.0.0-dev</version>
    <title>runtime.linux-x64.Microsoft.NETCore.ILAsm</title>
    <authors>Microsoft</authors>
    <owners>microsoft,dotnetframework</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <license type="expression">MIT</license>
    <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
    <icon>Icon.png</icon>
    <projectUrl>https://dot.net/</projectUrl>
    <iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
    <description>Internal implementation package not meant for direct consumption. Please do not reference directly. 
The .NET IL Assembler.

Usage:
  Install as a global tool:
    dotnet tool install -g Microsoft.NETCore.ILAsm

  Invoke the tool:
    ilasm [options] &lt;sourcefile&gt;

  For help on ilasm command-line options:
    ilasm -?</description>
    <releaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</releaseNotes>
    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
    <serviceable>true</serviceable>
    <packageTypes>
      <packageType name="DotnetTool" />
    </packageTypes>
    <repository type="git" url="https://github.com/dotnet/runtime" commit="0000000000000000000000000000000000000000" />
  </metadata>
</package>

And same for the primary package:

@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ unzip Microsoft.NETCore.ILAsm.10.0.0-dev.nupkg -d extract-ilasm
Archive:  Microsoft.NETCore.ILAsm.10.0.0-dev.nupkg
  inflating: extract-ilasm/_rels/.rels  
  inflating: extract-ilasm/Microsoft.NETCore.ILAsm.nuspec  
  inflating: extract-ilasm/runtime.json  
  inflating: extract-ilasm/Icon.png  
  inflating: extract-ilasm/THIRD-PARTY-NOTICES.TXT  
  inflating: extract-ilasm/tools/net10.0/any/DotnetToolSettings.xml  
  inflating: extract-ilasm/[Content_Types].xml  
  inflating: extract-ilasm/package/services/metadata/core-properties/237c5205e5cf487a87ddf60094c72e11.psmdcp  
@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ more extract-ilasm/Microsoft.NETCore.ILAsm.nuspec
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
  <metadata minClientVersion="2.12">
    <id>Microsoft.NETCore.ILAsm</id>
    <version>10.0.0-dev</version>
    <title>Microsoft.NETCore.ILAsm</title>
    <authors>Microsoft</authors>
    <owners>microsoft,dotnetframework</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <license type="expression">MIT</license>
    <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
    <icon>Icon.png</icon>
    <projectUrl>https://dot.net/</projectUrl>
    <iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
    <description>The .NET IL Assembler.

Usage:
  Install as a global tool:
    dotnet tool install -g Microsoft.NETCore.ILAsm

  Invoke the tool:
    ilasm [options] &lt;sourcefile&gt;

  For help on ilasm command-line options:
    ilasm -?</description>
    <releaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</releaseNotes>
    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
    <serviceable>true</serviceable>
    <packageTypes>
      <packageType name="DotnetTool" />
    </packageTypes>
    <repository type="git" url="https://github.com/dotnet/runtime" commit="0000000000000000000000000000000000000000" />
  </metadata>
</package>
@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ more extract-ilasm/tools/net10.0/any/DotnetToolSettings.xml
<?xml version="1.0" encoding="utf-8"?>
<DotNetCliTool Version="2">
  <Commands>
    <Command Name="ilasm" />
  </Commands>
  <RuntimeIdentifierPackages>
    <RuntimeIdentifierPackage RuntimeIdentifier="win-x64" Id="runtime.win-x64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="win-x86" Id="runtime.win-x86.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="win-arm64" Id="runtime.win-arm64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="linux-x64" Id="runtime.linux-x64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="linux-arm" Id="runtime.linux-arm.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="linux-arm64" Id="runtime.linux-arm64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="linux-musl-x64" Id="runtime.linux-musl-x64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="linux-musl-arm64" Id="runtime.linux-musl-arm64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="osx-x64" Id="runtime.osx-x64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="osx-arm64" Id="runtime.osx-arm64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="freebsd-x64" Id="runtime.freebsd-x64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
    <RuntimeIdentifierPackage RuntimeIdentifier="freebsd-arm64" Id="runtime.freebsd-arm64.Microsoft.NETCore.ILAsm" Version="10.0.0-dev" />
  </RuntimeIdentifierPackages>
</DotNetCliTool>
@jcouv ➜ .../artifacts/packages/Release/Shipping (copilot/fix-9141961-210716005-ba7fcf33-0366-4343-adba-5ef567bc9850) $ more extract-ilasm/package/services/metadata/core-properties/237c5205e5cf487a87ddf60094c72e11.psmdcp 
<?xml version="1.0" encoding="utf-8"?>
<coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.openxmlformats.o
rg/package/2006/metadata/core-properties">
  <dc:creator>Microsoft</dc:creator>
  <dc:description>The .NET IL Assembler.

Usage:
  Install as a global tool:
    dotnet tool install -g Microsoft.NETCore.ILAsm

  Invoke the tool:
    ilasm [options] &lt;sourcefile&gt;

  For help on ilasm command-line options:
    ilasm -?</dc:description>
  <dc:identifier>Microsoft.NETCore.ILAsm</dc:identifier>
  <version>10.0.0-dev</version>
  <keywords></keywords>
  <lastModifiedBy>NuGet.Packaging, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;.NET 8.0</lastModifiedBy>
</coreProperties>

@jcouv
Copy link
Member

jcouv commented Nov 6, 2025

@copilot Expand this PR to do the same for ILDasm

Copy link
Contributor Author

Copilot AI commented Nov 6, 2025

@copilot Expand this PR to do the same for ILDasm

Added ILDAsm tool package support in 24646d1. The implementation follows the same pattern as ILAsm:

  • Created DotnetToolSettings.xml with executable runner
  • Updated Microsoft.NETCore.ILDAsm.pkgproj with tool manifest generation
  • Added RID-specific package support with all official and community RIDs
  • Enhanced package description with usage examples

Both tools can now be installed as:

  • dotnet tool install -g Microsoft.NETCore.ILAsm (command: ilasm)
  • dotnet tool install -g Microsoft.NETCore.ILDAsm (command: ildasm)

Copilot AI changed the title Implement RID-specific tool packages for Microsoft.NETCore.ILAsm Implement RID-specific tool packages for Microsoft.NETCore.ILAsm and ILDAsm Nov 6, 2025
Copilot finished work on behalf of jcouv November 6, 2025 20:05
jcouv added a commit to jcouv/dotnet that referenced this pull request Nov 6, 2025
@jcouv
Copy link
Member

jcouv commented Nov 6, 2025

It is probably a good idea anyway to make sure that this change does not break the VMR builds.

Copied the modified files over to dotnet/dotnet in PR dotnet/dotnet#3262

Copilot finished work on behalf of jcouv November 6, 2025 20:34
@jcouv
Copy link
Member

jcouv commented Nov 7, 2025

The VMR build failed:

azure-pipelines
/ dotnet-unified-build (VMR Vertical Build Windows_x64)
src\winforms\src\Accessibility\src\Accessibility.ilproj#L0

src\winforms\src\Accessibility\src\Accessibility.ilproj(0,0): error NU1212: (NETCORE_ENGINEERING_TELEMETRY=Restore) Invalid project-package combination for runtime.win-x64.Microsoft.NETCore.ILAsm 10.0.0-ci. DotnetToolReference project style can only contain references of the DotnetTool type 

There was a similar problem with some other consumers (copied below).

Did some digging to understand how these project reference ILAsm packages:

  • the Accessibility projects use "Microsoft.NET.Sdk.IL" SDK (from Microsoft.NET.Sdk.IL.targets.template at /workspaces/dotnet/src/runtime/src/coreclr/.nuget/Microsoft.NET.Sdk.IL/Microsoft.NET.Sdk.IL.targets.template)
  • the projects under source-build-reference-packages pull in /workspaces/dotnet/src/source-build-reference-packages/src/targetPacks/Directory.Build.props which has <RestoreIlTooling>true</RestoreIlTooling>
##[error]src/source-build-reference-packages/src/targetPacks/ILsrc/microsoft.aspnetcore.app.ref/6.0.2/Microsoft.AspNetCore.App.Ref.6.0.2.csproj(0,0): error NU1212: (NETCORE_ENGINEERING_TELEMETRY=Restore) Invalid project-package combination for runtime.centos.10-x64.Microsoft.NETCore.ILAsm 10.0.0-ci. DotnetToolReference project style can only contain references of the DotnetTool type 
  /__w/1/s/src/source-build-reference-packages/src/targetPacks/ILsrc/microsoft.aspnetcore.app.ref/6.0.2/Microsoft.AspNetCore.App.Ref.6.0.2.csproj : error NU1212: Invalid project-package combination for runtime.centos.10-x64.Microsoft.NETCore.ILAsm 10.0.0-ci. DotnetToolReference project style can only contain references of the DotnetTool type  [/__w/1/s/.dotnet/sdk/10.0.100-ci/NuGet.targets]
##[error]src/source-build-reference-packages/src/targetPacks/ILsrc/microsoft.aspnetcore.app.ref/6.0.2/Microsoft.AspNetCore.App.Ref.6.0.2.csproj(0,0): error NU1212: (NETCORE_ENGINEERING_TELEMETRY=Restore) Invalid project-package combination for runtime.centos.10-x64.Microsoft.NETCore.ILDAsm 10.0.0-ci. DotnetToolReference project style can only contain references of the DotnetTool type 
  /__w/1/s/src/source-build-reference-packages/src/targetPacks/ILsrc/microsoft.aspnetcore.app.ref/6.0.2/Microsoft.AspNetCore.App.Ref.6.0.2.csproj : error NU1212: Invalid project-package combination for runtime.centos.10-x64.Microsoft.NETCore.ILDAsm 10.0.0-ci. DotnetToolReference project style can only contain references of the DotnetTool type  [/__w/1/s/.dotnet/sdk/10.0.100-ci/NuGet.targets]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants