How to access the MSIL code of compiled .NET assemblies?

坚强是说给别人听的谎言 提交于 2019-12-24 05:30:30

问题


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?


回答1:


Managed DLLs and EXEs are in MSIL.

You can see the MSIL using ildasm.exe.




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/9793319/how-to-access-the-msil-code-of-compiled-net-assemblies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!