The Artima Developer Community
Sponsored Link

C# Answers Forum
GAC - Assembly Reference

1 reply on 1 page. Most recent reply: Sep 4, 2003 1:24 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
sudharshan

Posts: 1
Nickname: sudhar
Registered: Aug, 2003

GAC - Assembly Reference Posted: Aug 27, 2003 8:39 PM
Reply to this message Reply
Advertisement
When I try to remove an assembly using /u or /uf, it fails displaying a message "Assembly could not be uninstalled because it is required by windows installer unable to unistall: .... ". How can i remove it or get information about the installer which refers this assembly


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: GAC - Assembly Reference Posted: Sep 4, 2003 1:24 PM
Reply to this message Reply
Removing it is easy (and requires the command-line, of course):

1. Open a command shell window (or "Command Prompt").
2. Go to %SystemRoot%\Assembly (eg. "pushd %SystemRoot%\Assembly").
3. Look for the actual location of the dll with the dir command like so "dir MyAssemblyName.dll /s"). You'll find it in some long directory name like "C:\windows\assembly\gac\MyAssemblyName\2.0.468.1596__a53cf5803f4c3827".
4. Now can delete or rename the dll in that directory (using the tab for directory completion will make this task a lot less tedious!).

Note that using explorer in this case won't work, because it doesn't show you folders, but instead a special GAC view.

Finding out who is using it is another matter. You can probably find a reference to it in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserDat a\[your user tag]\Components\[hash number], but that doesn't tell you what app or apps are using it. Depending on the installer (and perhaps the app, or maybe just the .net configuration?), when you run the app that depends upon it, it may pop up that annoying "missing components" update screen and try to download it from somewhere -- if this happens, then you will of course know what app it was.

Anyway, just in case, you may as well move the thing to some temp directory instead, then you can always undo the damage. You could just move or rename the "MyAssemblyName" directory that resides in the GAC directory; then you can easily restore the whole thing to its previous state, if need be.

Flat View: This topic has 1 reply on 1 page
Topic: Rotate Text in Rectangle ? Previous Topic   Next Topic Topic: Directories in C# .NET

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use