我想在 Windows Server 2008 R2 上将程序集安装到全局程序集缓存 (gac)。自上次 Windows 更新以来,它无法正常工作。
例如,我采用 AjaxControlToolkit:
首先我使用工具 sn 检查它,然后我尝试使用 gacutil 使用 gacuil 和 -i 选项安装它。命令提示符显示以下内容:
D:\lib>sn -v AjaxControlToolkit.dll
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly 'AjaxControlToolkit.dll' is valid
D:\lib>gacutil -i AjaxControlToolkit.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Failure adding assembly to the cache: Strong name signature could not be verifie
d. Was the assembly built delay-signed?
对 sn 的检查表明,程序集一切正常,并且是正确的字符串签名。但尽管如此 gacutil 无法验证强名称签名。