Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rvaquette opened this issue Jun 24, 2010 · 6 comments
Open

Comments

@rvaquette
Copy link

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
Copy link
Owner

jbevain commented Jun 24, 2010

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

@rvaquette
Copy link
Author

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.

@jbevain
Copy link
Owner

jbevain commented Jun 24, 2010

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

@rvaquette
Copy link
Author

Yes.

@rvaquette
Copy link
Author

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

@jbevain
Copy link
Owner

jbevain commented Aug 9, 2010

No, the bug would be closed otherwise :)

vitek-karas pushed a commit to vitek-karas/cecil that referenced this issue Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants