Note that there are some explanatory texts on larger screens.

plurals
  1. POVisual Studio 2005 -> 2008/10 Service Installer Project Upgrade issue
    primarykey
    data
    text
    <p>I've upgraded a [.vdproj MSI generator project built into VS2008] System.Configuration.Install.Installer with a <code>ServiceProcessInstaller</code> and a <code>ServiceInstaller</code> from Visual Studio 2005 to 2008. There are no customisations of consequence to the installer class (i.e., not trying to start or stop services or register children)</p> <p><code>RemovePreviousVersions</code> is set to <code>true</code>, and I'm changing the <code>Version</code> and <code>ProductCode</code>. This triggers an error during the install:</p> <p>"error 1001: the specified service already exists"</p> <p>Googling yields stuff (but not on SO until now):- <a href="http://www.google.ie/search?hl=en&amp;q=%22error+1001%3A+the+specified+service+already+exists%22&amp;meta=" rel="nofollow noreferrer">Google for "The specified service already exists"</a><br> The most useful one I've seen to date is <a href="http://forums.msdn.microsoft.com/en-US/winformssetup/thread/b2d1bd22-8499-454e-9cec-1e42c03e2557/" rel="nofollow noreferrer">http://forums.msdn.microsoft.com/en-US/winformssetup/thread/b2d1bd22-8499-454e-9cec-1e42c03e2557/</a> however this doesn't answer the fundamental question:-</p> <p>Given that the user can pick either:<br> a) an install location that's the same<br> or b) an install location that's different<br> what are the minimal code changes would one sensibly make to ensure that the old service gets uninstalled and the new one gets installed? Or is there something other than a code change required to resolve this for the basic scenario of upgrading v1.0.1 to v1.0.2 of the same service with the same name (i.e., signing)</p> <p>(AIUI the strong naming only comes into play if one has a significant uninstall step in the old installer that you dont have in the new one.)</p> <p>I generated a new installer in VS 2008 and it fares no better.</p> <p>For now, my workaround is to stop updating the <code>Version</code> and <code>ProductCode</code>, forcing the user to manually uninstall when they are told they already have a version installed.</p> <p>Addendum thanks to <a href="https://stackoverflow.com/users/40347/divo">divo's</a> probing: While the simplest hack that could possibly work is to say "if install step is called &amp; its an upgrade, call the uninstall step for the service first", I'd like a proper officially blessed answer! (e.g., how does the simple hack cope when the service is being renamed during an upgrade?)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload