By using the Global Assembly Cache tool (Gacutil.exe). In this command, assembly name is the name of the assembly to remove from the global assembly cache. How to uninstall DLL from assembly folder? Permission denied when. It can uninstall from the GAC. And ran gacutil -u dllName.DLL Installing the new DLL.
I have an old version of the Enterprise Library in GAC. It resists any attempt on its life made with GACUTIL.EXE claiming the following: Microsoft (R).NET Global Assembly Cache Utility. Version 3.5.30729.1 Copyright (c) Microsoft Corporation. All rights reserved. Assembly: Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=e44a2bc38ed2c13c, processorArchitecture=MSIL Unable to uninstall: assembly is required by one or more applications Pending references: SCHEME: ID: DESCRIPTION: Number of assemblies uninstalled = 0 Number of failures = 0 I found some explanation on the subject, but I can’t find any relevant registry keys. So I want the nuclear option.
![Gac Gac](https://renouncedthoughts.files.wordpress.com/2013/01/clip_image012.jpg)
Whose got one? Had the exact same problem with the OpenXml SDK Productivity Tool which only exists in version 2.5 but not in the latest 2.8.1. After updating the SDK for my ASP.Net webpage in Visual Studio using Nuget Package Manager I had the problem that during the publish process the old 'DocumentFormat.OpenXml V.2.5' dll was published and not the new one (which was referenced correctly in my Visual Studio project). So I decided to uninstall the old SDK first by using the 'Programs and Features' page and afterwards the 'Uninstall'-Option of the MSI installer file. Neither of it worked.
Somehow the dll remains in the GAC and in the Registry. I tried to uninstall it using GACUTIL.exe, but I got the above Message: Unable to uninstall: assembly is required by one or more applications Pending references: SCHEME: ID: DESCRIPTION: Then I deleted the registry key value for (ONLY THE VALUE, NOT THE KEY ITSELF) Computer HKEY_LOCAL_MACHINE SOFTWARE Classes Installer Assemblies Global DocumentFormat.OpenXml,version='2.5.5631.0',culture='neutral',publicKeyToken='31BF3856AD364E35'. And that worked for me. Afterwards the correct dll is published! Hope it helps someone!