Global Assembly Cache Tool (Gacutil.exe)

Global Assembly Cache Tool (Gacutil.exe)

The Global Assembly Cache tool allows you to view and manipulate the contents of the global assembly cache and download cache.

 

Examples

The following command installs the assembly mydll.dll into the global assembly cache.

gacutil /i mydll.dll

 

The following command removes the assembly hello from the global assembly cache as long as no reference counts exist for the assembly.

gacutil /u hello

 

Note that the previous command might remove more than one assembly from the assembly cache because the assembly name is not fully specified. For example, if both version 1.0.0.0 and 3.2.2.1 of hello are installed in the cache, the command gacutil /u hello removes both of the assemblies.

Use the following example to avoid removing more than one assembly. This command removes only the hello assembly that matches the fully specified version number, culture, and public key.

 

gacutil /u hello, Version=1.0.0.1, Culture="de",PublicKeyToken=45e343aae32233ca

 

The following command installs the assemblies specified in the file assemblyList.txt into the global assembly cache.

gacutil /il assemblyList.txt

The following command removes the assemblies specified in the file assemblyList.txt from the global assembly cache.

gacutil /ul assemblyList.txt

The following command installs myDll.dll into the global assembly cache and adds a reference to count it. The assembly myDll.dll is used by the application MyApp. The UNINSTALL_KEY MyApp parameter specifies the registry key that adds MyApp to Add/Remove Programs in Windows. The description parameter is specified as My Application Description.

gacutil /i /r myDll.dll UNINSTALL_KEY MyApp "My Application Description"

The following command installs myDll.dll into the global assembly cache and adds a reference to count it. The scheme parameter, FILEPATH, and the id parameter, c:\applications\myApp\myApp.exe, specify the path to the application that is installing myDll.dll. The description parameter is specified as MyApp.

gacutil /i /r myDll.dll FILEPATH c:\applications\myApp\myApp.exe MyApp

The following command installs myDll.dll into the global assembly cache and adds a reference to count it. The scheme parameter, OPAQUE, allows you to customize the id and description parameters.

gacutil /i /r mydll.dll OPAQUE "Insert custom application details here" "Insert Custom description information here"

 

The following command removes the reference to myDll.dll by the application myApp. If this is the last reference to the assembly, it will also remove the assembly from the global assembly cache.

gacutil /u /r myDll.dll FILEPATH c:\applications\myApp\myApp.exe MyApp

The following command lists the contents of the global assembly cache.

gacutil /l

 

转载于:https://www.cnblogs.com/MayGarden/archive/2009/12/23/1630865.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值