Provide a way to specify the file name of a ModuleDefinition for saving #26
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Microsoft Reflection.Emit library allows to specify the filename of a dynamic module, that may be different from its name, but Cecil provide no way to do the same.
(note: the filename is built automatically by Cecil when an assembly with external modules is saved).
Am not sure to get it. You mean that the FullyQualifiedName property is not set when writing a ModuleDefinition?
No, I need a way to provide to Cecil the name of a ModuleDefinition when it needs to save one.
See AssemblyWriter.cs, line 942:
In fact I would be happy to have in a ModuleDefinition a property FileName (for example), that could be used instead of the GetModuleFileName method if it is set.
So this only applies when writing an assembly with multiple module, and for non main module?
Yes.
Is there any solution for this case, in order to specify the filename of a non-main module?
No, the bug would be closed otherwise :)