.net-coreilasm

Where is ilasm.exe in Microsoft.NETCore.ILAsm?


I need the most recent ilasm.exe. I thought it would be the one from https://www.nuget.org/packages/Microsoft.NETCore.ILAsm/

However, the downloaded microsoft.netcore.ilasm.2.0.0.nupkg archive doesn't contain any .exe or .dll files.

I don't get how to use this package.


Solution

  • This package makes use of a new feature in NuGet to split packages per runtime. At the root of the Microsoft.NETCore.ILAsm package, you'll find a runtime.json file that references other nuget packages per platform. This means that when this package is used for runtime-specific actions, another referenced one is used.

    For 64 bit windows, this json file contains:

    "win-x64": {
      "Microsoft.NETCore.ILAsm": {
        "runtime.win-x64.Microsoft.NETCore.ILAsm": "2.0.0"
      }
    },
    

    So you have to download the runtime.win-x64.Microsoft.NETCore.ILAsm nugget package instead which then contains a runtimes/win-x64/native/ilasm.exe file to use.