Bug in assembly resource decompilation
FbSoft
Posts: 1 New member
Hi,
I upgraded Net Reflector to version 11.1 from version 10.3.
When I try to open an localized assmbly resource like System.Web.Mvc.resources.dll clicking on assemIy node I obtain the following error:
Translation failure in 'System.Web.Mvc.resources, Version=5.2.7.0, Culture=de, PublicKeyToken=31bf3856ad364e35' in 'System.Web.Mvc.resources, Version=5.2.7.0, Culture=de, PublicKeyToken=31bf3856ad364e35'.
System.Reflection.TargetInvocationException
Caused by:
Unable to get assembly reference for type of code identifier.
System.NotSupportedException
in Reflector.ObjectModelResolutionHelper.GetAssemblyReference(ITypeReference value)
in Reflector.CodeIdentifier.SetTypeDeclaration(IType type)
in Reflector.CodeIdentifier..ctor(Object value)
in Reflector.Application.UserInterface.HtmlFormatterViewer.GenerateLinkUrl(Object value)
in Reflector.Application.UserInterface.HtmlFormatterViewer.WriteReference(String text, String toolTip, Object target)
in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteCustomAttribute(ICustomAttribute customAttribute, IFormatter formatter)
in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteCustomAttributeList(ICustomAttributeProvider value, IFormatter formatter, String target, HashSet`1 hide)
in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteAssembly(IAssembly value)
in Reflector.Application.UserInterface.DisassemblerWindow.Render(Boolean expandTypes, Boolean expandMethods)
System.Reflection.TargetInvocationException
Caused by:
Unable to get assembly reference for type of code identifier.
System.NotSupportedException
in Reflector.ObjectModelResolutionHelper.GetAssemblyReference(ITypeReference value)
in Reflector.CodeIdentifier.SetTypeDeclaration(IType type)
in Reflector.CodeIdentifier..ctor(Object value)
in Reflector.Application.UserInterface.HtmlFormatterViewer.GenerateLinkUrl(Object value)
in Reflector.Application.UserInterface.HtmlFormatterViewer.WriteReference(String text, String toolTip, Object target)
in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteCustomAttribute(ICustomAttribute customAttribute, IFormatter formatter)
in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteCustomAttributeList(ICustomAttributeProvider value, IFormatter formatter, String target, HashSet`1 hide)
in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteAssembly(IAssembly value)
in Reflector.Application.UserInterface.DisassemblerWindow.Render(Boolean expandTypes, Boolean expandMethods)
Conversely using the older version 10.3 the assembly is loaded correctly.
Thanks
Filippo
Tagged:
Answers
It seems like version 11.1.0.2167 of Reflector has a critical bug that prevents decompiling assemblies with generics. The issue results in errors, including
System.NotSupportedException: Malformed function pointer signature
. After updating to the latest Visual Studio 2022 service pack, this version becomes unusable for most DLLs.For now, I recommend switching to JetBrains dotPeek, which is more reliable. Here's an example of the error encountered with Reflector:
dotPeek should provide a better decompiling experience until Reflector gets patched.