If Visual Studio 2010 based on WPF, why I cannot open it with reflector?

感情迁移 提交于 2019-12-10 21:08:33

问题


If Visual Studio 2010 based on WPF, why I cannot open it with reflector?

In other words, devenv.exe seems to be native assembly, so where is the WPF UI code?


回答1:


The Visual Studio devenv.exe executable is indeed a native program. However, native programs can load the .NET runtime and thereby host Windows Forms and WPF components. In fact, Visual Studio has always done this. Even before VS2010 adopted WPF for its editor and shell, the various Visual Studio designers were implemented in Windows Forms. If you go into the Common7\IDE and Common7\IDE\PrivateAssemblies directories, you'll find lots of designer DLLs that you can view in Reflector (e.g. Microsoft.VisualStudio.ORDesigner.Dsl.dll is the LINQ to SQL designer).

So the new WPF bits of Visual Studio are just another set of managed assemblies hosted in the native executable. I'm not sure which particular assemblies host the WPF bits -- and to be honest there are probably dozens. But looking at the VS process in the debugger, I'd say Microsoft.VisualStudio.Editor.dll (which lives in the GAC, not in the VS install directory) would be a good place to start.



来源:https://stackoverflow.com/questions/2679482/if-visual-studio-2010-based-on-wpf-why-i-cannot-open-it-with-reflector

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