I have to make the same program for two different companies (different logo, different name).
I would like to have this done automatically when I do a release.
I am thinking to use a resource file or a satellite assembly, but I am not sure how to proceed.
Which way do you think is the best?
Thanks.
EDIT:
- The differences are only one image and one string.
- I would like to
have everything generated in one click. - We might get more clients in
the future. - I must also add that I use SmartAssembly to merge all my dependencies into one exe file.
The best I can think of it a batch script.
Get your project to reference files (images (logo), text (company name), etc). i.e. C:\MyProject\Resources. So that when the project builds it complies them into the application/installer etc.
This way, you can write a script (.bat file) which copies in the resources needed per company.
Step 1 – Delete all files in the Resources folder
Step 2 – Use MSBuild.exe to build you project
Step 3 – Copy the files needed from the bin/release folder to a directory (i.e. C:\Release\CompanyA)
Step 4 – Change the variables in the script to load the details for the next company. And repeat from step 1, so it copies over the needed resource files and rebuilds.