2

I've developed a simple installation package using WiX that installs an assembly called WBRT.Configuration into the Global Assembly Cache (GAC). While the file installs, it is not removed when the package is uninstalled.

I've tried running a command prompt as administrator, used msiexec /x specifying the msi filename and msiexec /x specifying the product code.

With the /l*v switch, there is no error:

Executing op: ActionStart(Name=MsiUnpublishAssemblies,Description=Unpublishing assembly information,Template=Application Context:[1], Assembly Name:[2]) Executing op: AssemblyUnpublish(,,AssemblyType=1,,AssemblyName=WBRT.Configuration,version="1.0.0.0",culture="neutral",publicKeyToken="361AD75BADC53912",processorArchitecture="MSIL",Descriptor=2-(xWui~z@UnhQuo-~Gh>S.OwM9Kim9x0ul%Ore=9) Executing op: ActionStart(Name=UnpublishFeatures,Description=Unpublishing Product Features,Template=Feature: [1])

WiX File element

<File Id="filB7155C3E9A241BEAFE09533364964732" KeyPath="yes" Assembly=".net" Source="$(var.Configuration.TargetDir)\WBRT.Configuration.dll" />

MsiAssemblyName table in Orca

MSIAssemblyName

File in the GAC

File in GAC

Version tab of the file in the GAC

Version

I'm completely stumped. Does anyone have ideas?

Alex Angas
  • 59,219
  • 41
  • 137
  • 210

2 Answers2

2

I followed the steps mentioned by @Mohsen , Remove the registry entry and uninstalled the DLL from GAC to resolve a conflict issue.

[HKLM\SOFTWARE\Classes\Installer\Assemblies\Global] and run gacutil /u dllname -And success. I do not know what is the side effect. It worked for me, then I ran

gacutil -u dllThatIWantedToRemove

C.P. Soni
  • 41
  • 2
1

First, verify that your assembly is not locked by another process via gacutil.exe

gacutil /u WBRT.Configuration

If the above is OK make sure the file parent container has no permanent flag - Permanent="no"

<Component Shared="yes" Permanent="no" Guid="PUT-GUID-HERE" >
    <File Id="filB7155C3E9A241BEAFE09533364964732" KeyPath="yes" Assembly=".net" 
       Source="$(var.Configuration.TargetDir)\WBRT.Configuration.dll" />
</Component>
KMoraz
  • 14,004
  • 3
  • 49
  • 82
  • 2
    Gacutil gave the message `Unable to uninstall: assembly is required by one or more applications`. Process Explorer showed what processes were locking the DLL and ended them. The file then uninstalled correctly! – Alex Angas Jan 12 '12 at 22:06
  • @AlexAngas : same with me. How to unlock the dependency? – toha Apr 27 '17 at 06:57
  • 1
    Finally I delete my dll name key at [HKLM\SOFTWARE\Classes\Installer\Assemblies\Global] and run gacutil /u dllname -> And success. I do not know what is the side effect. – toha Apr 27 '17 at 07:15
  • @Toha, worked for me, then I ran `gacutil -u dllThatIWantedToRemove` – Mohsen Sichani Sep 12 '17 at 23:08