I have a .NET executable.
For this executable, I need to merge it together with its configuration to get only one file.
This configuration can be anything, not only app.config file and it is static and will never change after merging. But it will be dynamic before merging. So I can end up with many executables each with different configuration build-in.
The merging process will be run programaticaly, with configuration being parameters and needs to be reasonably fast.
Anyone had similiar problem? I was thinking about merging using ILMerge with resources, but I dont know if it can do it. Or I can build whole exacutable with devenv, this requires VisualStudio to be installed on the PC, that is merging, which will not always be the case. And I don't think it will be fast enough.
Edit: After looking around for a second and trying something, maybe Mono.Cecil can do the work. In my executable, I will create a static Configuration class, which will have properties with my configuration. And using IL rewrite, I will change what those properties return. Any opinions about this?