Cannot decompile System.Windows.dll for Windows Phone 8 with ILSpy

纵饮孤独 提交于 2019-12-08 05:13:04

问题


I am using ILSpy, a free .NET assembly decompiler, to analyze the standard and 3rd party .NET assemblies. It works enough well for the standard .NET WinForms and WPF libraries, but I could not decompile System.Windows.dll for Windows Phone 8 located in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\. It displays the members, but their internals (source code) are empty.

Is it a problem of ILSpy, or we cannot decompile Windows Phone .NET libraries using any other tools like Red Gate's .NET Reflector? Is there any other way to get/view the source code of these assemblies?


回答1:


The assemblies that are installed in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0 are just placeholders used for the auto-completion in Visual Studio. You can extract the real assemblies directly by mounting the VHD image used by the emulator (the images are located in C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images). I don't remember exactly where the .NET assemblies are stored in the VHD, but you should be able to find them easily by using the search feature of the Windows Explorer. Those are standard .NET assemblies, so you can open them with any decompiler (ILSpy, Reflector, JustDecompile, ...).



来源:https://stackoverflow.com/questions/22383996/cannot-decompile-system-windows-dll-for-windows-phone-8-with-ilspy

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