How to Clean the Global Assembly Cache

104 15
    • 1). Click the Windows "Start" menu and type "Visual Studio." Windows will return a list of search results.

    • 2). Locate an entry that has "Command Prompt" in the name. The wording that you see will differ depending on your version of Visual Studio. For example, if you use Visual Studio 2005, you will see "Microsoft Visual Studio 2005 Command Prompt." Click that item. The "Command Prompt" window will open.

    • 3). Type the following in the "Command Prompt" window:

      Gacutil --l

      Press "Enter." Windows will display a list of the assemblies in the Global Assembly Cache.

    • 4). Click the "C" icon at the top of the window and select "Edit" and then "Mark." Hold down your left mouse button and highlight the assembly that you want to remove from the GAC. Click the "C" icon again and select "Edit" and then "Copy." This copies the assembly name to your clipboard.

    • 5). Type the following in the window:

      gacutil --u PASTE ASSEMBLY NAME HERE

    • 6). Click the "C" icon at the top of the window and select "Edit" then "Mark." Hold down your left mouse button and highlight "PASTE ASSEMBLY NAME HERE." Click the "C" icon, select "Edit" and then "Paste." Windows will paste the name that you copied. For example, if you copied an assembly named "Calculate," the final command might look like this:

      gacutil /u "Calculate,Version=1.0.0.0, Culture=neutral, PublicKeyToken=0123456789ABCDEF"

    • 7). Press "Enter" to execute the command. Remove other assemblies from the GAC as needed.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.