Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Merge module files won't uninstall from Module Retargetable Folder
 

Merge module files won't uninstall from Module Retargetable Folder

Hello.

I have a Merge Module and a Setup & Deployment Project, both of which I've created myself using Visual Studio 2005 SP1 running and installing on Vista.

The Merge Module installs 5 assemblies (one primary output and four interop dependencies) into the Module Retargetable Folder, and my deployment project leaves this set to the default (which is the Application Folder). My Setup and Deployment project then adds one further assembly, which also gets installed into the Application Folder.

The deployment project installs as I would expect it to, but I've noticed that when I uninstall it, the 5 assemblies from the Merge Module get left behind on the file system. The only file that gets removed is the one assembly that was specifically put there by the Setup & Deployment project.

I presume this isn't supposed to happen, but can anyone perhaps tell me if it's a known issue or if I might be missing something with how I've created them? I'd be happy to provide more information which might be relevant.


The application itself is a VSTO-based Outlook plugin, and I had a theory that Outlook might have still had a hold on the assemblies and prevented them from being uninstalled, but I've noticed exactly the same thing happen if I uninstall immediately after installation (without actually opening Outlook), so it doesn't seem like that would be happening.

This is the only Setup project on the system which uses this Merge Module, so I'm fairly confident that there shouldn't be issues with the module thinking that it's still needed by something else (despite its installation of files into a folder specific to that application), although I wonder if that's what's happening. I could probably just package all of the files directly into my main deployment project, but I'd rather keep them separate if possible, since semantically they represent their own component which I might want to re-use somewhere else later.


Thanks for any help with this.
Mike.


Mike McGavin  Tuesday, November 13, 2007 9:34 PM

Two things to check (both in the VS merge module project):

Right click on each of the files in the "Module Retargetable Folder" folder to view the Properties Window. Then:

  1. Check the value of the "Permanent" property. It should be set to 'False' by default but something may have changed it to 'True'. This VS property sets the msidbComponentAttributesPermanent bit for the associated entry in the Component Table. This is most likely the culprit.
  2. If the component has a value set for the Condition property, check the value of the Transitive property. This is also set to 'False' by default but probably should be changed if you have a value specified for the Condition property. This VS property sets the msidbComponentAttributesTransitive bit for the associated entry in the Component Tableand will usually only cause a problem during a 'Repair' or 'Modify' action (rather than an 'Uninstall').

ColbyRingeisen  Tuesday, November 13, 2007 11:57 PM
Hi Colby.

Thanks for the quick response. I hadn't thought to check either of the possibilities you've suggested, but unfortunately neither seems to be causing the problem. None of the files have the Permanent property set to True. I'm also not using any Conditions, and correspondingly the Condition property for all of the problem files (in the Merge Module project) is empty.

I tried looking at both .MSI and .MSM databases using Orca. For the five files in the Merge Module which remain on the file system, the Attribute value in the Component table is set to 0. (This is the case in both MSM and MSI databases.) Is this what you would typically expect for a simple Merge Module created by Visual Studio?

For what it's worth, the additional assembly added by the MSI database also has a Attributes value of 0 in the Component table, and that one is being removed without an issue.


Mike.

Mike McGavin  Wednesday, November 14, 2007 2:48 AM
To add to this, I've since discovered that if I re-install my MSI, but point it to a different Application folder (eg. c:\program files\some_other_location\ instead of c:\program files\default_location\), then Uninstall it, then the files from the MSM get correctly removed from the new folder and that folder disappears.

In other words, the problem seems somehow specific to the application being installed in the location where I originally installed it. I'm now wondering if there could be something in the Windows Installer System which is referencing the files in the original place and is preventing them from being removed. I'm not entirely sure what to look for, though.

The list of installed products returned by the the Windows Installer Cleanup Utility doesn't show anything obvious. In fact, if I've uninstalled the application and it's left files behind, there's nothing in the list to indicate that the application is still installed. It doesn't look as if that utility is designed to display anything about installed merge modules, however.


This may be localised to my development system, but it's still a bit frustrating not knowing what's causing it.

Mike.

Mike McGavin  Wednesday, November 14, 2007 10:53 PM
Hi there

Did u find a solution for this.
I have the same problem, my msm installs perfectly fine but doesn't seem to delete the files during uninstall
-S
testdfdsd  Thursday, March 05, 2009 9:49 PM
I also have the same _exact_problem. Anyone know what's going on?
Dan Lash
Dan Lash  Friday, August 21, 2009 7:47 PM

You can use google to search for other answers

Custom Search

More Threads

• Compiler about .NET Setup Project~
• Get origin server prgrammatically
• Manually checking for componentID
• Unable to save config to file error message. Has anyone encountered this>
• Control in IE interferes with Form Post in ASPX page
• Setup and Deployment issue Vista to XP
• Publish error.
• Setting deployment package to always uninstall existing product first?
• How to change the CA Root Certificate Expiration Date?
• Setup Project - DISABLEADVTSHORTCUTS and Uninstalling option