[转]How to Clean the Global Assembly Cache

本文转自:https://www.techwalla.com/articles/how-to-clean-the-global-assembly-cache

The Global Assembly Cache (GAC) folder in Microsoft Windows stores assemblies common to multiple applications. An assembly is a single, compiled unit that contains information about all the files and resources in a .NET application. The .Net framework comes with pre-installed assemblies. Developers can also place assemblies into the GAC to share them with other applications. Microsoft notes that you don't generally need to remove items from the Global Assembly Cache, but it does provide tools for cleaning the GAC.

 

Step

Click the Windows Search charm and type "Visual Studio." Windows will return a list of search results.

Step

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 2013, you will see "Microsoft Visual Studio 2013 Command Prompt." Click that item. The "Command Prompt" window will open.

Step

Type the following in the "Command Prompt" window:

 
Step

Gacutil –l

Step

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

Step

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.

 
Step

Type the following in the window:

Step

gacutil –u PASTE ASSEMBLY NAME HERE

Step

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" to paste the name that you copied. For example, if you copied an assembly named "Calculate," the final command might look like this:

Step

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

Step

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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值