[英]Is there a way to browser Source Code when pressing F12 if I only have the DLL and PDB files?
I have a very large solution (384 projects), and I usually work in only one of these projects at a time.我有一个非常大的解决方案(384 个项目),我通常一次只在其中一个项目中工作。 So when opening that project alone, pressing F12 brings me only to the metadata page of the used DLL.
因此,单独打开该项目时,按 F12 只会将我带到所用 DLL 的元数据页面。 My project has reference to the DLL files created in the bigger solution.
我的项目引用了在更大的解决方案中创建的 DLL 文件。
Is there a way to browse the Source Code when pressing F12 if I only have the DLL and PDB files?如果我只有 DLL 和 PDB 文件,有没有办法在按 F12 时浏览源代码?
There's no official way of doing so, but since a lot of years, there's a tool/extension called Reflector which disassembles MSIL into readable C# code .没有这样做的官方方法,但是多年来,有一个名为Reflector的工具/扩展 可以将 MSIL 反汇编为可读的 C# 代码。
It works exactly as you want... You press F12 and it decompiles the code to show C# code.它完全按照您的意愿工作...您按F12并反编译代码以显示 C# 代码。 BTW, it won't never be the exact source code as you developed in your solution.
顺便说一句,它永远不会是您在解决方案中开发的确切源代码。 It's a translation back from MSIL to C#.
这是从 MSIL 到 C# 的转换。
It's not free, but AFAIK, there's a trial and maybe it's worth the price for you...它不是免费的,但是 AFAIK,有一个试用版,也许它对您来说物有所值...
JetBrains(ReSharper 的制造商)提供他们自己的 MSIL 反编译器,称为 dotPeek https://www.jetbrains.com/decompiler/您可以启用源服务器支持,它会在您 F12 时显示反编译的源代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.