How to check MSIL with ILDASM | Code By Topic

How to check MSIL with ILDASM

By
The ILDASM (IL  Disassembler ) is a very good tool for those who wants to look of IL code. Basically IL code is Intermidate Language it also known as MSIL (Microsoft Intermediate Language) This tool is used to view the assembly content for all the code components .  This tools is installed with the your Visual Studio and in a traditional way, can be access from the Visual Studio Command Prompt.  In this post you will learn how you can open the same tool inside Visual Studio by using a shortcut key.
So,Now lets see the traditional way, To open the ILDASM follow the below steps

1. Open the Visual Studio Command Prompt
2. Run ILDASM Command.
Here is a sample screen shots of application opened using ILDASM.
MSIL Code
Here is the problem, whenever you need this tool, ever time you have to open the Visual Studio command prompt and then run it like above few steps. What if, if you could do it directly from Visual Studio ? First question is it is possible answer is yes then now let see how to do the same

Well, follow the below steps to configure your Visual Studio to launch the ILDASM tool.

Navigate to Tools –> External tools


Visual Studio ILDASM

Click on the “Add” button, and then provide Title, Command ( Which is the physical path of your ILDASM Tool, and then set the Initial Directory as $(TargetDir) . Please note down the path which are in command section in below screen

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.1 Tools\ildasm.exe
above path is vary from .Net framework to .net framework. Choose the highest version like if  \Microsoft SDKs\Windows\v10.0A  & \Microsoft SDKs\Windows\v11.0A then choose V11.0. Same for NETFX 4.7.1 Tools. 


Add ILDASM in Visual Studio

That’s it. You are done ! Click on Apply. Navigate to Tool menu, and now you should be able to see the “ILDASM (IL Disassembler )” option along with all other external tool.
Display ILDASM in Visual Studio
Hope now picture is clear how to add ILDASM in your Visual Studio IDE

0 comments:

Post a Comment