471,354 Members | 1,053 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Bug in Upgrading Window-Service Setup Project (w/ RemovePreviousVersion)

Language Used: C#
Project Typed: Setup Project (for .NET Window Service)

Hi Bump into this issue and seriously have a hunch that this is a bug in the .NET setup project. These are the scenario:

- I have an existing Window-Service application written in C#, and was build following the general deploying Window-Service guideline (the Win-Service project has a Installer class that have ServiceProcessInstaller & ServiceInstaller that control the attributes of the window-service to be installed)

Along with the window-service project, there's also a pretty standard VS setup project, which have all its Custom Actions(onInstall OnUninstall rollback etc) pointing to the Window-Service ProjectOutput.

Recently we need to make an update to the window-service app and in this change we need to change the description and the display name of the window service and also the default-location on where the app will be deployed to.

So I went on and update the Setup project by incrementing the version, changing the PRODUCT CODE and keeping the UPGRADE CODE. I set the RemovePreviousVersion to true with the intention to automatically remove the previous version.

Problem is when I run the installation, the setup will pop a message-box:

"Could not find a part of the path [OLD APP-LOCATION-PATH].InstallState"

when this message-box was popped out, all the previous-version install has been removed (the Service is gone and the old Application-folder is gone also from the program files)

SO after doing some-debugging this is what I found out:
Supposed this:
Old-appPath: C:\Program Files\Company\AppVersion1.0\WinSvcApp.exe
New-AppPAth C:\Program Files\Company\AppVersion2.0\WinSvcApp.exe

- When a previous version exist, and RemovePreviousVersion is set to True, the MSI installer will run the un-install on the old application assembly first (see the Old-AppPath above), which is the correct behavior that we want

- BUT after it's finished w/ the un-install and started to install the new version, somehow the assembly-path that the installer is using is still pointing to the OLD application assembly - which explains why it still need to point to the old InstallState path

Again - this is really odd because like I said before, right after the un-install finished I check the File-system in my dev-box and found that all the old files has been removed and the services has been removed also

so my Big question is there anyway to get around this glitch or am I doing anything wrong ????

any help would be greatly appreciated
Dec 12 '07 #1
0 1753

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Phil Jones | last post: by
1 post views Thread by JJ | last post: by
reply views Thread by Adam Clauss | last post: by
reply views Thread by Stephan Steiner | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.