locked
How to REMOVE a publisher policy assembly from the GAC using gacutil? RRS feed

  • Question

  • I've created a publisher policy assembly for an assembly and have successfully installed it in the GAC using gacutil.exe. I need to remove that assembly from the GAC now (to verify that I can delay-sign a policy assembly for local testing since I don't have access to the full public-private key file at my current location.)

    Here's what I see:

    >gacutil -i Policy.1.0.TestBoundLibrary.dll
    Microsoft (R) .NET Global Assembly Cache Utility.  Version 2.0.50727.42
    Copyright (c) Microsoft Corporation.  All rights reserved.

    Assembly successfully added to the cache

    However, unlike normal assemblies I am unable to remove it:

    >gacutil -u Policy.1.0.TestBoundLibrary.dll
    Microsoft (R) .NET Global Assembly Cache Utility.  Version 2.0.50727.42
    Copyright (c) Microsoft Corporation.  All rights reserved.

    No assemblies found matching: Policy.1.0.TestBoundLibrary.dll
    Number of assemblies uninstalled = 0
    Number of failures = 0

    Is there something that I am missing? I have also tried using gacutil -ul [path to file containing AssemblyName] with no luck. I'd really rather not delete it manually (i.e. from explorer or the command line) since I am unsure if there are any side-effects for doing so for a publisher policy assembly. Since my installer will undoubtedly have to remove this assembly from the GAC when my product is uninstalled I need to know how to do this the 'right' way.

    Thanks,

    Cappy Popp

    Tuesday, December 5, 2006 9:57 PM

Answers

  • Gacutil's -i option takes a file name as the argument. The -u option takes an assembly name. Try removing the ".dll" extension.

     

    Wednesday, December 6, 2006 7:49 AM

All replies

  • Gacutil's -i option takes a file name as the argument. The -u option takes an assembly name. Try removing the ".dll" extension.

     

    Wednesday, December 6, 2006 7:49 AM
  • Whoops - just saw that. Sorry for the dumb question. :-\
    Wednesday, December 6, 2006 3:12 PM