By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,492 Members | 1,199 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,492 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Share this question for a faster answer!
Share on Google+

Post your reply

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