.net-core: Equivalent of ILDASM / ILASM

前端 未结 4 612
时光取名叫无心
时光取名叫无心 2021-02-05 15:05

Is there the equivalent of ILDASM / ILASM for the .net-core?

Specifically, I\'m looking for something that runs on Linux (Hence why the .net-core).

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-05 15:28

    It does not appear there is a native Microsoft tool that serves these functions on Linux and it is not currently built into the dot-net-core.

    However, Mono allows the assembly and disassembly of IL code:

    Installation Instructions can be found here.

    What you are looking for is:

    ilasm - For assembling
    monodis - For disassembling
    

    These are found in the package mono-utils:

    e.g. On Debian 8 I did the following:

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    echo "deb http://download.mono-project.com/repo/debian jessie" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
    sudo apt-get update
    apt-get install mono-devel mono-utils
    

    However, FYI, for those trying to create exports, Mono does not appear to handle the x64 export syntax.

提交回复
热议问题