Reflector issue when decompiling a WPF assembly (i.e. PresentationCore, PresentationFramework)

流过昼夜 提交于 2019-12-07 14:54:12

问题


I just downloaded the last version of Reflector from RedGate and I was unable to decompile classes in some core WPF assemblies like PresentationCore and PresentationFramework.

Here is a link to a picture that describes my problem:

http://997966480542455630-a-1802744773732722657-s-sites.googlegroups.com/site/badrdocs/files/Reflector_issue.png?attachauth=ANoY7cqzFOr_iIPHnS2V67hKSpxXdlr4B0fOh7u2pzWImgJp6QKELErlVpOoCkDP3IVd4zvbnCBDWHXw-hY_eeGu5UUqWiuW5bbAb2YDTETnZYJ3bMvfN6WF28u2ERar9DcjeuqXslKt1bv7SY8dW82da0ndleAaoBDBe0QuY1jHVfOPK4HkXqpZOqKF0nMZNCP36rhFkBgzdG8SSYnA4YwKmYwD_mS2Kg%3D%3D&attredirects=1

Thank you for your help.


回答1:


Okay, this is your problem (I know because I had the same issue):

There are some assemblies that, for whatever reason, can't disassemble (its as if they are empty). These assemblies are (sorry, memory here) under the Program Files directory somewhere.

You need to open the same assemblies but under C:\Windows\Microsoft.NET\Framework\etc\etc.




回答2:


What version do you have? I'm using 6.1.0.11 (apparently the latest) and I get the following:

protected override DependencyObject GetContainerForItemOverride()
{
    return new ListBoxItem();
}

If you're not seeing that, I would suggest a better place to ask would be the RedGate forums.




回答3:


I suspect you're using an older version of Reflector to inspect .NET 4.0 assemblies... I had this problem too, but the latest version of Reflector fixes it.



来源:https://stackoverflow.com/questions/2845950/reflector-issue-when-decompiling-a-wpf-assembly-i-e-presentationcore-presenta

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