cecil icon indicating copy to clipboard operation
cecil copied to clipboard

COM Visibility Issues

Open coffeegist opened this issue 5 years ago • 1 comments

Using the following code, when the original assembly is a ComVisible dll, the COM methods are no longer usable. Am I missing something or does cecil change an attribute by design/accident that I'm not seeing?

AssemblyDefinition assemblyDef = AssemblyDefinition.ReadAssembly("comVisible.dll");   

assemblyDef.Write("testOut.dll");

After running the above code, testOut.dll can no longer be used by the COM clients.

I am running Cecil v0.11.1

coffeegist avatar Jan 21 '20 21:01 coffeegist

Hi, thanks for reporting this.

That definitely sounds like a bug and not something that you're missing.

Cecil should preserve the metadata, so it's not probably not an attribute. Maybe it could be related to the PE headers, where we're not preserving the original, and we're missing a flag here.

jbevain avatar Jan 24 '20 18:01 jbevain