How can I have different properties and such in a vs 2010 setup project for the for two different release versions?

StackOverflow https://stackoverflow.com/questions/5100947

Question

What I want is to only have one setup project in my solution, and I want to be able to install 'release1' and the 'release2' versions (as in versions debug/release1/release2) simultaneously on one machine. So, the release1 version needs its own program folder, product code and shortcuts and such, and the release2 version needs its own unique versions of these things too.

It seems however the setup project doesn't store seperate properties for the two different release versions. Seems all thats different is the output path, and of course they use the different generated exes.

Am I going to have to move to Wix to solve this problem? Or is there something simple I'm missing here? It seems kind of stupid that you can't configure the installer to do different things for two different release versions. So far its looking like I'll have to make another setup project, which is going to be annoying because I don't like having to maintain one setup project let alone 2.

Thanks in advance for the help.

Isaac

Was it helpful?

Solution

Creating two different setup projects, one called Production Setup and one called Test Setup might be the cleanest way, since it makes the OS believe you are delivering two different products, which is in fact the case here.

Moving to WiX, as you suggested by yourself, has indeed the advantage that you can reuse parts in both your setup projects, avoiding the need to maintain the same list of files twice, for example.

There is, of course, another option. If your Production Setup and your Test Setup projects are almost identical, and you need just to exchange some GUIDs (the product or package code, for example, to make MSI consider them to be different), create a simple script which copies the first setup project file to a second location and exchanges the GUIDs within the file (which is nothing but an XML file). So you have only to maintain the first project file and can regenerate the second one easily by rerunning the script.

Personally I am doing such stuff in VBS, but you can also use powershell for that or write a simple tool in any language capable of doing XML or RegEx processing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top