I have to distribute a software with 2 different names and, obviously, with different assembly information, such as name, descriptions, company etc.
I'm focusing to find the easy way to handle this huge problem by only changing the compiled EXE name/icon/etc.
Changing icon is not a problem, I found an easy post compilation script. But I cant find any article about changing assembly infos.
Have you got any tips for me? or at least a new ways to go?
Try using preprocessor directives in AssemblyInfo.cs like following
#if XYZ
[assembly: AssemblyTitle("NameXYZ")]
#elif ABC
[assembly: AssemblyTitle("NameABC")]
#endif
Then simply build your app with two different configurations (ABC, XYZ).
As I understand it, assembly descriptors are part of metadata that are written to an assembly during compilation and can't be easily (there may be a way) changed afterwards in order to protect consumers of the assembly against someone who might tinker with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With