- Install dotnet-ildasm nuget in your project.
- Add the following entry to the .csproj of your test project:
<ItemGroup>
<DotNetCliToolReference Include="dotnet-ildasm" Version="*" />
</ItemGroup>
PS: Please specify the actual version instead of using *.
Implemented as a dotnet cli extension, which allows for an easy to use command line.
Default options, generating a file named after the assembly (myassembly.il):
dotnet ildasm myassembly.dll
Output results to the command line:
dotnet ildasm myassembly.dll -t
Select specific method or classes to be disassembled:
dotnet ildasm myassembly.dll -t -i ClassName::Method
Defining a file name to output:
dotnet ildasm myassembly.dll -o disassembledAssembly.il