You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this looks to be related to the special handling of TypeIdentifierAttribute by Roslyn where it does not allow cross-assembly references to such types which conflicts with how the dnSpy code editor works.
dnSpy takes the original file, removes the type you are currently editing, injects an InternalsVisibleTo attribute, and adds this new file as a reference to a project which contains only the class code for the class you are editing. This means that we access that type with TypeIdentifierAttribute using a cross-assembly reference which is blocked by Roslyn.
The way to fix this will probably mean patching the assembly we reference even more to remove the TypeIdentifierAttribute from the types. The current patcher works on raw bytes and the custom attribute format is quite complicated so I will see what I can do with it to get rid of the TypeIdentifierAttribute.
dnSpyEx version
https://github.com/dnSpyEx/dnSpy/actions/runs/11113265812
Describe the Bug
Code Editor unable to resolve types with [TypeIdentifier] attribute
How To Reproduce
Create a .NET struct/interface etc with [TypeIdentifier]
Decompile with dnSpy and try to edit code.
Expected Behavior
The type is resolved
Actual Behavior
The type could not be resolved
Additional Context
No response
The text was updated successfully, but these errors were encountered: