从全局程序集缓存(GAC)中删除程序集 [英] Removing Assembly from Global Assembly Cache(GAC)
问题描述
我在从GAC删除程序集时遇到一些问题.我不能使用"gacutil",因为它可能
并非在所有系统中都存在(包括具有.NET框架的机器).
我正在使用"System.EnterpriceServices.Internal.Publish"对象添加和删除程序集.
添加程序集很好,但是我无法删除它.
我正在使用此代码删除..
发布pObj = new Publish();
pObj.GacRemove("myassemblypath");
我错过了一些步骤吗?
我该怎么办?
欢迎任何建议...
Hi,
I am having some problem in removing an assembly from the GAC. I can not use "gacutil" because it might
not be present in all system(including the machine having .NET frame work).
I am using "System.EnterpriceServices.Internal.Publish" object to add and remove assembly.
Addition of assembly is fine but I can not remove it.
I am using this code to remove..
Publish pObj = new Publish();
pObj.GacRemove("myassemblypath");
Am I missing some steps??
What should I do??
Any suggestion is welcome...
推荐答案
看看 ^ ]有趣的文章.可能有帮助.
Have a look at this[^] interesting article. It might help.
删除程序集-使用文件名为
的完整路径 pobj.GacRemove("AssemblyPath");
此外,请确保您的程序集应使用以下符号签名:
sn.exe -k assemblyname//它是.dll或.exe
to remove the assembly - use full path with the file name
pobj.GacRemove("AssemblyPath");
Moreover make sure, your assembly should be signed using:
sn.exe -k assemblyname //either it is .dll or .exe
这篇关于从全局程序集缓存(GAC)中删除程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!