Questions tagged [ildasm]

Microsoft intermediate language (MSIL) Disassembler

The MSIL Disassembler is a companion tool to the MSIL Assembler (Ilasm.exe). Ildasm.exe takes a portable executable (PE) file that contains Microsoft intermediate language (MSIL) code and creates a text file suitable as input to Ilasm.exe.

This tool is automatically installed with Visual Studio and with the Windows SDK. To run the tool, you can use the Visual Studio Command Prompt or the Windows SDK Command Prompt (CMD Shell). These utilities enable you to run the tool easily, without navigating to the installation folder.

MSDN: Ildasm.exe (MSIL Disassembler)

101 questions
1
vote
0 answers

Why is IsConst emitted twice in char * const a

I've disassmebled the following C++/CLI code in ildasm: Managed(char * const a) { } and the disassembled IL looks like this: .method public hidebysig specialname rtspecialname instance void .ctor(int8…
IS4
  • 11,945
  • 2
  • 47
  • 86
1
vote
1 answer

Keep the delegate argument names when compiling C++/CLI for .Net

In C# I can get Visual Studio to keep the delegate's argument names. For example if I have: public delegate void Blah(object myArg); public event Blah Foo; Then when I add a method to the event, Visual Studio UI automatically keeps the names and…
Yochai Timmer
  • 48,127
  • 24
  • 147
  • 185
1
vote
1 answer

Why can't I decompile System.IdentityModel.Services.dll?

I am trying to decompile System.IdentityModel.Services.dll but none of the decompiling tools show the method details I cannot even get the IL for these methods in ILDASM. Same story for ILSpy. for example: …
9b5b
  • 1,508
  • 11
  • 20
1
vote
4 answers

Default Access modifier of a class in C#

The default Access modifier of a class in C# is internal. But on inspecting the class with ildasm it shows class as private. .class private auto ansi beforefieldinit ConsoleApplication1.Program extends [mscorlib]System.Object { } // end…
user1426187
  • 95
  • 2
  • 6
1
vote
1 answer

Is it feasible to use ildasm + ilasm to patch a single method?

I have a working .NET assembly whose source has been lost. I would like to recompile with just one method replaced. I have seen this done only by rewriting a class at a time. However this class is huge so that approach is not economically viable. …
finnw
  • 47,861
  • 24
  • 143
  • 221
1
vote
1 answer

CLR IL-significance of square bracket on .locals init

I am trying to generate a dynamic assembly using Reflection & Emit in .NET. I am getting an error, "Common Language Runtime detected an invalid program." I created another program which has the functionality I want using hard-coded types. The…
jrv
  • 496
  • 4
  • 8
1
vote
1 answer

How is the .net referenced assemblies names resolved by the clr at runtime?

when my .net exe runs, it loads the correct .net assemblies at rumtime. i understand that there is a probing process that happens. my question is that if i open up the .net exe/dll in ildasm, i only the .extern reference to the mscorlib.dll, not…
Tiju John
  • 933
  • 11
  • 28
1
vote
1 answer

A procedure imported by {dll} could not be loaded

I have several Unmanaged C++ written lib files which I need to link to Managed C++ dll. Then I need to invoke functions of this Managed C++ from C# application. First step is OK - Managed C++ dll is created, I can see with ildasm that it exports…
IgorStack
  • 799
  • 2
  • 6
  • 22
1
vote
0 answers

Does ILASM work with Mixed Mode Application?

I am trying to modify a method in a third-party dll Use ILDASM to generate IL Modify IL method Use ILASM to generate DLL (FAILURE) I found the reason due to this error is the third-party dll contains unmanaged code. Is there any way that I can…
CreateChen
  • 19
  • 5
1
vote
1 answer

Dump Referenced Assemblies

Which command line option of ILDASM dumps just the referenced assemblies? If it is not possible, is there an alternate tool/way to dump the references assemblies in a .NET DLL.
Chubsdad
  • 24,777
  • 4
  • 73
  • 129
1
vote
0 answers

where does ILDASM show the .JPG, .XML, .txt files apart from the assembly and type metadata

Could anyone please guide me as to where does the ILDASM show the .JPG, .XML, .txt files (that are added to the project) apart from the assembly and type metadata Regards
Prakash Bhatia
  • 243
  • 1
  • 6
1
vote
2 answers

How to insert a file g.resources into an Assembly

I need to modify an assembly changing one resource. I've already extracted the resource and modified it but now I cannot find the way to embed it again into the assembly. I've tried with ildasm but seems like it wants a .res resource file and I just…
Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
0
votes
1 answer

Crash Dump Analysis: how to find the module and instruction causing the crash

I have a crash dump file and I want to identify the exact instruction where the crash occurred, more precisely in 'System_Messaging_ni+60e4e', because I suspect of a MSMQ issue. Function Arg 1 Arg 2 …
mpm
  • 213
  • 3
  • 6
0
votes
0 answers

Why is Ildasm for dotnet 7 installed with Visual Studio 2022 in a folder named NETFX 4.8?

Why is the latest ildasm version that ships with dotnet 7 in a folder named "NETFX 4.8"? C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\ildasm.exe I searched long for the latest Ildasm until I realized that the NETFX 4.8…
citykid
  • 9,916
  • 10
  • 55
  • 91
0
votes
0 answers

Ildasm on linux does not output resource files

Running the command "./ildasm inputfile.dll -out=outputfile.il" on linux outputs only the "outputfile.il". According to the documentation: If you provide Ildasm.exe with a PEfilename argument that contains embedded resources, the tool produces…
Nago
  • 1