Provide a way to specify the file name of a ModuleDefinition for saving #26

Open
opened 2010-06-24 03:40:48 -05:00 by rvaquette · 6 comments
rvaquette commented 2010-06-24 03:40:48 -05:00 (Migrated from github.com)

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).

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).
jbevain commented 2010-06-24 04:06:56 -05:00 (Migrated from github.com)

Am not sure to get it. You mean that the FullyQualifiedName property is not set when writing a ModuleDefinition?

Am not sure to get it. You mean that the FullyQualifiedName property is not set when writing a ModuleDefinition?
rvaquette commented 2010-06-24 04:18:40 -05:00 (Migrated from github.com)

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:

var file_name = GetModuleFileName (module.Name);
module.Write (file_name, parameters);

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.

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: <pre> var file_name = GetModuleFileName (module.Name); module.Write (file_name, parameters); </pre> 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.
jbevain commented 2010-06-24 04:29:52 -05:00 (Migrated from github.com)

So this only applies when writing an assembly with multiple module, and for non main module?

So this only applies when writing an assembly with multiple module, and for non main module?
rvaquette commented 2010-06-24 04:51:49 -05:00 (Migrated from github.com)

Yes.

Yes.
rvaquette commented 2010-08-09 10:58:45 -05:00 (Migrated from github.com)

Is there any solution for this case, in order to specify the filename of a non-main module?

Is there any solution for this case, in order to specify the filename of a non-main module?
jbevain commented 2010-08-09 11:01:40 -05:00 (Migrated from github.com)

No, the bug would be closed otherwise :)

No, the bug would be closed otherwise :)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-jbevain/cecil#26
No description provided.