[英]How to access the MSIL code of compiled .NET assemblies?
VB.NET and C# (and other language) compilers generate MSIL code. VB.NET和C# (和其他语言)编译器生成MSIL代码。 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? 如何从
cmd
提示符下编译C#程序,以及如何检查使用该编译器创建的每个文件?
Managed DLLs and EXEs are in MSIL. 托管DLL和EXE位于MSIL中。
You can see the MSIL using ildasm.exe . 您可以使用ildasm.exe查看MSIL。
The Ildasm.exe tool is installed
with the framework
along with VS. Ildasm.exe工具与VS一起随
框架
一起安装。 You can find it in the <Program Files>\\Microsoft SDKs
folder. 您可以在
<Program Files>\\Microsoft SDKs
文件夹中找到它。
It opens .EXE and .DLL files. 它会打开.EXE和.DLL文件。
You'll need a decompiler, such as Telerik's JustDecompile (free). 您将需要反编译器,例如Telerik的JustDecompile(免费)。 With it you can open any .NET executable or DLL and examine the generated MSIL (in the language of your choice).
使用它,您可以打开任何.NET可执行文件或DLL,并检查生成的MSIL(以您选择的语言)。
http://www.telerik.com/products/decompiler.aspx http://www.telerik.com/products/decompiler.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.