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
2
votes
1 answer

CLR Metadata TypeDef Table Count

Consider following code: public sealed class Program { public static void Main() { System.Console.WriteLine("Hi"); } } after compiling it with csc.exe, I've open the assembly using ILDasm and found something I couldn't figure…
Tamir
  • 3,833
  • 3
  • 32
  • 41
1
vote
1 answer

How do I Obtain Code Coverage on Assembly after ExportDll has run it through ildasm/ilasm?

I'm using a post-build step on my C# assembly to expose a function signature from my dll. This step uses the ExportDll tool from http://www.codeproject.com/KB/dotnet/DllExport.aspx. However, if I run my dll through mstest and attempt to get a code…
villecoder
  • 13,323
  • 2
  • 33
  • 52
1
vote
1 answer

How to locate Anonymous Types in source code files using Visual Studio

During the process of obfuscating a .NET assembly (using Dotfuscator), I have found myself tweaking how things are renamed. This often involves looking at the assembly in ILDASM and tracing a Type back to the source code file that it is defined…
Gene C
  • 2,010
  • 26
  • 34
1
vote
1 answer

ildasm / ilasm - Symantec false positive

I am having a problem with disassembling and reassembling a .NET executable and it throwing a false positive after. The error I get specifically is: Heur.AdvML.B As of now, I am no longer editing the asm prior to re-compiling it. I literally…
netdev
  • 21
  • 2
1
vote
1 answer

Is there a tool to disassemble a single .NET type along with all of its dependencies?

Suppose I wish to disassemble a type. But this type depends on other types in the same assembly and so forth. In a sense, I wish to be able to disassemble the closure defined by a particular type. I am not interesting in disassembling to C#. Plain…
mark
  • 59,016
  • 79
  • 296
  • 580
1
vote
1 answer

C# dnlib / IL code - Creating a new dictionary

I am creating my own program for changing .exe code via dnlib. Then I want to create a Dictionary via IL and Dnlib code. But there are not many tutorials for both so it's pretty hard.. It writes wrong Dictionary code and makes DnSpy crash. My…
1
vote
1 answer

Whats the best way to programmatically read ildasm output

I'm trying to make ildasm output more like json or xml so that its somewhat easy to programmatically read it. The way I intended to do it by reading the output line by line and then adding the classes and methods etc to lists and then modify and…
eim64
  • 81
  • 9
1
vote
0 answers

Visible Property in decompiler instr

I need to know how can I find the Visible property of a MenuStrip in assembly. I created a simple WinForms Project and I added a menuStrip. Then I changed the Visible property to true/false. I am decompiling with ildasm.exe but I cannot spot the…
Mihai
  • 389
  • 1
  • 4
  • 16
1
vote
1 answer

Using ildasm to detect markup differences between WPF assemblies

I use ildasm to determine changes/differences between built assemblies. This works well, but when I try and get it to detect changes in Xaml for (WPF projects), I cannot find any differences - after changes are made to the projects markup. Any…
NubieJ
  • 575
  • 2
  • 9
  • 21
1
vote
0 answers

ILDASM incorrectly disassembles method

I need to debug a dll at the IL Level, and reading http://blogs.msdn.com/b/jmstall/archive/2004/10/03/237137.aspx I wanted to disassemble/reassemble the DLL with il(d)asm. The disassembly runs through, but the reassembly fails with Assembled method…
Lukas Rieger
  • 676
  • 10
  • 31
1
vote
1 answer

Are there any significant differences between assemblies targeting different .NET versions?

When I'm creating a NuGet package I always ask myself how many targets I should provide? And usually I create all possible from 4.0 to 4.6 with all versions in between. But is this really necessary? I noticed that all assemblies have the same size…
t3chb0t
  • 16,340
  • 13
  • 78
  • 118
1
vote
2 answers

Ildasm Ctrl + M (Metadata)

I've opened assembly created by me named CarLibrary.dll with ildasm.exe, but when I try to open it's metadata with shortcut CTRL + M (or by choosing it from the main menu) the program is being closed instead of launching it. This does work when I…
Paweł Poręba
  • 1,084
  • 1
  • 14
  • 37
1
vote
0 answers

XAML Parse Exception on project deploy error

I have a WPF application that works fine on certain platforms and systems, including, of course, the development system, however, it runs into issues on some, but not all, platforms on deploy. This sounds like an issue with regard to dependencies,…
Giallo
  • 785
  • 2
  • 10
  • 26
1
vote
3 answers

In general, how to convert ilasm syntax into Reflection.Emit calls?

I am writing a special-purpose mini-compiler and I often view disassembled CIL to figure out how to do things. But it's often not obvious how to translate the disassembled code to Reflection.Emit calls. Does a reference manual exist or any other…
Qwertie
  • 16,354
  • 20
  • 105
  • 148
1
vote
0 answers

Using iladsm+ilasm produces a different assembly

I want to change an attribute in an already-compiled assembly (in the future I might be able to compile my sources twice, but not at-the-moment...). This answer suggests that I use ildasm, munge the properties in the text file and then re-assemble…
Jonathan
  • 6,939
  • 4
  • 44
  • 61