ASpeak IOpine!

Forcefully delete an assembly from GAC

Posted on April 17, 2009

image 

Very often during development we try to remove an assembly from GAC. However, due to many reasons the assembly might not get deleted and the above screen is displayed. There is no easy way to remove this assembly as it may be locked due to numerous reasons and one might need to break his head identifying the proper reason behind this.

However, there is an easy solution to this problem.

Open “regedit” and navigate to “HKEY_CLASSES_ROOT\Installer\Assemblies\Global”. In this location one can find the list of all the assemblies which are registered in GAC. Delete the appropriate entry from this list. Now you can delete the assembly from GAC as well. This is a simple trick to get rid of that stubborn assembly which was stuck in your GAC.

I hope this simple trick will save many man hours ! :)

Comments (4) Trackbacks (0)
  1. Many thanks. It answered one of my biggest question !! You are so helpful. :) I always had to uninstall the program to remove files from assembly folder. With your trick I can save so much time.

  2. Nice trick. I have been a developer all my life but I didn’t know this nifty way of doing such an important thing that I encounter so frequently. I usually update the dll by dragging and dropping it in assembly but it is not the same as removing the existing version. Thanks a lot.

  3. Thanks !! this helped a lot !!

  4. You have given me great knowledge and i am going to use this for sure for my future projects.


Trackbacks are disabled.