cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
schmoli
Level 6

Major Upgrade and SharedDLL Reference Counts.

I've written a new installer that needs to act as a major upgrade to a previous version of our software. For a number of reasons, instead of converting the project, this was created as a new project. My problem is that there are some (ok, hundreds) of components that will end up in the same location as the previous install. I didn't think this would be an issue, as I've chosen to do a complete uninstall, and then re-install of the new application. However for all of these dlls, the refcount is going from 1 = 2 after the major upgrade.

If I hand remove the previous setup, then install my upgrade, the refcount is correctly set to 1 (and the files will remove). Does anyone have any clue as to why this may be happening? If it matters (and I'm about to test this), the component IDs have changed, as going through hundreds of guids by hand sure doesn't sound fun to me.

edit 1: if i match GUIDs with the previous version, it works fine, but I really thought "completely uninstall old setup before installing new setup" would act just like if I were to, well do that sentence exactly as it says, but manually.
Labels (1)
0 Kudos
(2) Replies
schmoli
Level 6

schmoli wrote:
I've written a new installer that needs to act as a major upgrade to a previous version of our software. For a number of reasons, instead of converting the project, this was created as a new project. My problem is that there are some (ok, hundreds) of components that will end up in the same location as the previous install. I didn't think this would be an issue, as I've chosen to do a complete uninstall, and then re-install of the new application. However for all of these dlls, the refcount is going from 1 = 2 after the major upgrade.

If I hand remove the previous setup, then install my upgrade, the refcount is correctly set to 1 (and the files will remove). Does anyone have any clue as to why this may be happening? If it matters (and I'm about to test this), the component IDs have changed, as going through hundreds of guids by hand sure doesn't sound fun to me.

edit 1: if i match GUIDs with the previous version, it works fine, but I really thought "completely uninstall old setup before installing new setup" would act just like if I were to, well do that sentence exactly as it says, but manually.


I figured this out and thought I would post it just in case someone else can't find the answer (although after enough googling, it all made sense).

I had to edit the Install-Execute sequence and move RemoveExistingProducts to right after FindRelatedProducts (and I think the important bit is before CostInitialize/any of the actual new install actions) and that allows the previous install to completely get removed before doing any new stuff.
0 Kudos
hkjang
Level 4

I know it's pretty old posting, but I'd like to thank you for posting this.
I was having exactly the same problem and your solution fixed my problem!
Thank you very much!
0 Kudos