views:

110

answers:

2

Hi,

I have run into this problem a lot in the past, but never really found an answer to it. When I create a Setup Kit in Visual Studio 2008 (my projexts are usually in VB if that changes something), it all seem to work fine. However, when I deploy a new version of the setup kit something weird happen:

The installation goes just fine (it check the version to see if it is the same like it usually do), the changes in the registry are made (I assumed there are some changes in the registry or wherever Windows store its data for the 'Add Remove Program portion of its OS), but the files are not changes, so I'm still stuck with the old version!

If I try to install the older version, it tells me that the newer version is install and therefore won't allow it, confirming the fact the something was changed during the installation. Furthermore, when I try to reinstall the newer version, then I get the usual option of delete and repair. Then if I repair, nothing change. If I delete it, then the application is deleted successfully. Should I try to reinstall the newer setup kit from scratch (either on a new PC, after deleting it from the 'Add-Remove Program' option or using the 'Delete' option from the setup kit) then the newer version is installed.

It's doing it for every project I did in 2008 and I'm pretty sure I'm doing everything right since I do the same with VS.2005 project and they work fine. Is this a known issue with 2008? Is there a fix?

Thanks

A: 

Do you have a VERS resource in your payload? Perhaps the installer detects that the version of the app/dll you're installing has not changed (from 0.0.0.0 to 0.0.0.0).

If you don't have a vers, add it and see if it helps.

Good Luck.

Raymond W
What do you by VERS in my payload?
David Brunelle
+2  A: 

With the windows installer in vs2008 there are two versions that are important. One is the version in the properties of the installer project itself. Changing the installer version results in a pop up asking you to make a similar change in the product code. If I am not mistaken, bumping this version essentially creates a different installation package that overwrites an existing installation target (the vb app) and ends up in version mismatches.

The other version is on your vb application and is the assembly or file versions in the application tab of your vb app project properties.

Based on your complaint it sounds like you are changing the installer version when you should be changing the assembly version of your vb application.

I may have this backwards, it has been some time since I used the vs installer.

Slaftos
Sorry but I AM changing the version in the installer, since I do get the product code changing pop-up.Not sure if it's the same thing in 2008, but when I would compile the deployment kit after I changed the code and tried to install it without changing the version, I would get an error stating the version is different and would refuse to install.
David Brunelle
Ok I pulled out the old code where I had solved this problem and these are the required steps:In the install project propertiesDetectNewerInstalledVersion = trueInstallAllUsers = trueRemovePreviousVersions = trueBefore each deployable build change the install package version to greater than the previous version and it must be greater than 1.0.0Ack the pop up with yes change the product code.And change the assembly version of your vb app as well. It also must be greater than 1.0.0.0Then it should remove the old and install the new.
Slaftos
O and the current version will have to be uninstalled manually, but once you get this set up every install after should be good.
Slaftos
As soon as I can I will try it.
David Brunelle
Wow... I was starting to be discouraged by this problem.. It now seems to work A-OK!Definitly worth the bounty!
David Brunelle