2

VB.NET and C# (and other language) compilers generate MSIL code. How can I see that code?

What is there in that file? Where does that file reside and how can I access that?

Second question:

How do I compile a C# program from the cmd prompt and how do I check each and every file created using that compiler?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kishore Kumar
  • 12,675
  • 27
  • 97
  • 154

3 Answers3

3

Managed DLLs and EXEs are in MSIL.

You can see the MSIL using ildasm.exe.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • For the benefit of searchers, this tool will be held somewhere like C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools. The reference in this post has some samples at the bottom which are very helpful. – JsAndDotNet Jul 24 '17 at 15:53
1

The Ildasm.exe tool is installed with the framework along with VS. You can find it in the <Program Files>\Microsoft SDKs folder.

It opens .EXE and .DLL files.

H H
  • 263,252
  • 30
  • 330
  • 514
1

You'll need a decompiler, such as Telerik's JustDecompile (free). With it you can open any .NET executable or DLL and examine the generated MSIL (in the language of your choice).

http://www.telerik.com/products/decompiler.aspx

mgnoonan
  • 7,060
  • 5
  • 24
  • 27