views:

282

answers:

1

I have two slightly different versions of my VB applications that I would like to publish simultaneously. The differences are minimal and mostly include GUI and some internal logic. Incorporating changes into a single application is not an option right now.

I tried publishing and installing them separately but the latest installer always overwrites whatever has already been installed. For example, if I install App v1, then App v2, only App v2 will be visible. If App v1 is installed after App v2, only App v1 will be visible. What I want to have is to have them both installed.

I am using Visual Studio 2008.

Thanks,

+6  A: 

Factor the common code out into one or more separate projects. Perhaps a class library project; perhaps a Windows Forms project for shared user controls.

Then create one Windows Forms project for each of the versions you want. Have these projects refer to the shared pieces they need.

It's always better to start off by going with the flow, before you try to swim against the tide. The flow in Visual Studio is "one project, one assembly". Start with that and see how far it takes you.

John Saunders
Re-publishing the project with a different Assembly name will stop it from overwriting itself when a different version. It's cumbersome (the onus is on me to keep track of this) but it does the trick.
Goro
Ok, so how do you create the two different versions? ifdef?
John Saunders
No, just published in a different directory with a different assembly name.
Goro
Right, but I thought you said the two versions differed slightly, in the code. How do you cause the same project to produce different code, whether with the same, or a different assembly name?
John Saunders
I see what you're asking. I have two different branches in the code, they are in separate project files, opened and published independently. I did not produce the two versions from the same project files.
Goro
No, but it's still the same common source.
John Saunders