Uninstall Assembly from GAC

  • Thread starter Thread starter Matt Frame
  • Start date Start date
M

Matt Frame

I wrote a small assembly to test the process of placing it into the Global
Assembly Cache but now I cannot remove it. When I hi-light and click delete
I get the following:

Assembly 'Assembly Name' could not be uninstalled because it is required by
other applications.

I have signed on as the local administrator, I booted into safe mode and I
keep getting this message. Can you only put assemblies into the GAC? I
would assume if you had to update it you have to delete it first. I have
even tried the gacutil -u utility and it comes back with assembly not found.

Please help

Matt
 
Did you install it there in the GAC with a Windows Installer setup? Like a
VS.NET Setup project?
 
Hi Matt,

Did it a classlibrary or a service?
I think the assembly was installed with one (or more) applications, which
have yet to be uninstalled, and will rely on that assembly being in the GAC
the next time they are used. If you are sure that you want to get rid of
this assembly, then you can use the gacutil /uf command to do it. Note
however, that even gacutil /uf will not uninstall
assemblies put in the GAC by Windows Installer.
You may try to use gacutil /lr to see if there is any reference?
You may also try to use gacutil /uf to uninstall the assembly by force.


Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
 
This is just a small 5 line class that I was testing with. It is not
installed as part of anything. I tried the gacutil /uf and that didn't work
either. It gives me the same message as the other methods.

I created a second small utility and it does the same thing. I can't
uninstall anything I add and it thinks they have been installed by Windows
Installer and that is not true.
 
Hi Matt,

I have perform many tests and do many searches, but I can not reproduce the
problem and find no known issue.
Anyway, you may try to delete the file in GAC directory directly by
following the steps below.
1. Run cmd in run dialog.
2. cd
%systemroot%\assembly\gac\ClassLibrary1\1.0.1322.21592__22df95e3b227e638
(My test dll is ClassLibrary1.dll)
3. del ClassLibrary1.dll
4. del __AssemblyInfo__.ini
5. cd..
6. rd 1.0.1322.21592__22df95e3b227e638
7. cd..
8. rd ClassLibrary1

You may perform the steps above to see if the ClassLibray1 has been removed
from the GAC.




Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
From: "Matt Frame" <[email protected]>
References: <[email protected]>
 
Peter,

Thanks for that solution. I was able to remove it with your recommended
approach. I really appreciate it as I had no idea what to do next. I still
don't understand how I can manually add something to the GAC and not be able
to remove it.

Thanks again,

Matt
 
Hi Matt,

I think the ClassLibrary that was added to the GAC is also a file in the
disk. So if you can delete the file in the disk, you can also remove it
from the GAC.[a directory]
If you don't want the ClassLibrary removed, you may need to forbide the the
ClassLibrary file from being deleted.

Did I answer your question?


Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: "Matt Frame" <[email protected]>
References: <[email protected]>
<[email protected]>
 
Back
Top