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
3
votes
2 answers

Where to go to view System.Collections.Generic IL code in ildasm?

My curiosity piqued by this question, I went in search of the implementation of List.Clear(). When I ran ildasm on System.Collections.dll like so: cd c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5 "C:\Program Files…
DWright
  • 9,258
  • 4
  • 36
  • 53
3
votes
0 answers

find out what references dll

I just solved the following error: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The…
Chris Halcrow
  • 28,994
  • 18
  • 176
  • 206
2
votes
1 answer

.NET runtime handling Generic code

How does .NET runtime handle Generic code? Are there special constructs in MSIL which enable Generic support? Can it be found out using ILDASM or Reflection? If Yes, How?
Rohit Vipin Mathews
  • 11,629
  • 15
  • 57
  • 112
2
votes
0 answers

Modify the version information of a built .NET assembly

Is there a better way to modify the version information of a .NET assembly of the one I am currently using. My current approach is the following. I do disassemble the assembly with ildasm: ildasm /nobar Riolo.WebUI.dll /out=Riolo.WebUI.il This…
aledeniz
  • 431
  • 3
  • 13
2
votes
1 answer

Is there an ILDASM tool for dotnet 5 or 6?

The dotnet sdks for the "core" versions apparently have no ildasm tool. While the old Ildasm tool that shipped with dotnet 48 works with dotnet 6 assemblies I wonder if there is an Ildasm for dotnet 6.
citykid
  • 9,916
  • 10
  • 55
  • 91
2
votes
1 answer

ILDASM could not be found in the PowerShell window of Visual Studio 2019

Trying to follow tutorial steps and disassemble an executable c# file but whenever i type ildasm on the command prompt it says not recognized in a developer powershell. Shows the same message when i do it for dll file as well. please help.
pffft
  • 33
  • 4
2
votes
1 answer

ildasm on Linux via nuget installation: ildasm executable not found

I installed ildasm on my Ubuntu 18.04 via nuget install Microsoft.NETCore.ILDAsm I somehow ended up with two directories: /home/vagrant/.nuget/packages/microsoft.netcore.ildasm/2.0.8/ /home/vagrant/Microsoft.NETCore.ILDAsm.2.0.8/ but none of them…
langlauf.io
  • 3,009
  • 2
  • 28
  • 45
2
votes
1 answer

Custom attributes are not consistent errors moving a VS 2008 solution to VS 2010

I'm trying to move my VS 2008 solution to VS 2010. Everything works perfectly (compile and link) if I keep the target framework at 4.0. When I change the framework 2.0 and change the platform framework v100 (to get past compile errors) only to…
2
votes
1 answer

which type of the constant does the `ldstr` instruction use?

I am reading the .NET IL Assembler book. There is a quote of the book: `ldstr` "Enter a number" is an instruction that creates a string object from the specified string constant and loads a reference to this object onto the stack. The string…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
2
votes
1 answer

signing unsigned interdependent third party libraries

My project uses a set of unsigned third party libraries (compiled in .Net 2.0). I already know how to sign these libraries using ildasm and ilasm. However, the problem is that the thirdparty libraries are interdependent. As a result, after ilasm,…
R D
  • 521
  • 5
  • 12
2
votes
1 answer

Superfluous NOPs and branches in unoptimized MSIL

When I compile the following code as debug... public class MyClass { private int myField; public int MyProperty { get { return myField; } set { myField = value; } } } ...strange bytecode with seemingly useless…
Good Night Nerd Pride
  • 8,245
  • 4
  • 49
  • 65
2
votes
2 answers

Different IL generated when adding one more int variable

I have this program in c#: using System; class Program { public static void Main() { int i = 4; double d = 12.34; double PI = Math.PI; string name = "Ehsan"; } } and when i compile it, following is the IL generated by…
Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
2
votes
1 answer

Missing graphics when disassembling and re-assembling .net program

I have a piece of software. When I disassemble the PE file ildasm foo.exe /output=foo.il I get a bunch of files, like foo.MainForm and foo.bar.dll. When I then try to re-assemble the file ilasm foo.il I get a working foo.exe back again, but some…
Frank Meulenaar
  • 1,207
  • 3
  • 13
  • 23
2
votes
1 answer

Create a signed copy of my assembly on the fly

I need to make a signed copy of my assembly on the fly. I've tried to do so by adding this script in the post-build event: call "$(DevEnvDir)..\Tools\vsvars32.bat" ildasm /all /out=MyAssemblySignedVersion.il $(TargetFileName) ilasm /dll…
Shani
  • 99
  • 6
2
votes
1 answer

Assembly recompilation and assembly load issue

I have an executable (Foo.exe) and a library Bar.dll. Both binaries are NOT strong name signed. The Bar.dll library depends on the executable file and has it specified in its manifest in such manner:
Bartosz
  • 732
  • 9
  • 30