如何强制从 GAC 卸载程序集?
我使用 WiX 开发了一个简单的安装包,将名为 WBRT.Configuration
的程序集安装到全局程序集缓存 (GAC) 中。安装该文件时,卸载软件包时不会删除该文件。
我尝试以管理员身份运行命令提示符,使用 msiexec /x 指定 msi 文件名,并使用 msiexec /x 指定产品代码。
使用 /l*v 开关,不会出现错误:
Executing op: ActionStart(Name=MsiUnpublishAssemblies,Description=Unpublishing assembly information,Template=Application Context:[1], Assembly Name:[2]) 执行操作: AssemblyUnpublish(,,AssemblyType=1,,AssemblyName=WBRT.Configuration,版本=“1.0.0.0”,culture=“中性”,publicKeyToken=“361AD75BADC53912”,processorArchitecture=“MSIL”,Descriptor=2-(xWui~z@ UnhQuo-~Gh>S.OwM9Kim9x0ul%Ore=9) 执行操作:ActionStart(Name=UnpublishFeatures,Description=取消发布产品功能,Template=功能:[1])
WiX File element
Orca 中的 MsiAssemblyName 表
GAC 中的文件
GAC 中文件的版本选项卡
I'我完全被难住了。有人有想法吗?
I've developed a simple installation package using WiX that installs an assembly called WBRT.Configuration
into the Global Assembly Cache (GAC). While the file installs, it is not removed when the package is uninstalled.
I've tried running a command prompt as administrator, used msiexec /x specifying the msi filename and msiexec /x specifying the product code.
With the /l*v switch, there is no error:
Executing op: ActionStart(Name=MsiUnpublishAssemblies,Description=Unpublishing assembly information,Template=Application Context:[1], Assembly Name:[2])
Executing op: AssemblyUnpublish(,,AssemblyType=1,,AssemblyName=WBRT.Configuration,version="1.0.0.0",culture="neutral",publicKeyToken="361AD75BADC53912",processorArchitecture="MSIL",Descriptor=2-(xWui~z@UnhQuo-~Gh>S.OwM9Kim9x0ul%Ore=9)
Executing op: ActionStart(Name=UnpublishFeatures,Description=Unpublishing Product Features,Template=Feature: [1])
WiX File element
<File Id="filB7155C3E9A241BEAFE09533364964732" KeyPath="yes" Assembly=".net" Source="$(var.Configuration.TargetDir)\WBRT.Configuration.dll" />
MsiAssemblyName table in Orca
File in the GAC
Version tab of the file in the GAC
I'm completely stumped. Does anyone have ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我按照 @Mohsen 提到的步骤操作,删除注册表项并从 GAC 卸载 DLL 以解决冲突问题。
[HKLM\SOFTWARE\Classes\Installer\Assemblies\Global] 并运行 gacutil /u dllname - 并成功。
我不知道有什么副作用。它对我有用,然后我运行了
gacutil -u dllThatIWantedToRemove
I followed the steps mentioned by @Mohsen , Remove the registry entry and uninstalled the DLL from GAC to resolve a conflict issue.
[HKLM\SOFTWARE\Classes\Installer\Assemblies\Global] and run gacutil /u dllname -And success.
I do not know what is the side effect. It worked for me, then I ran
gacutil -u dllThatIWantedToRemove
首先,验证您的程序集没有被其他进程锁定
通过 gacutil.exe
如果上述内容正常,请确保文件父容器没有永久标志 -
永久=“否”
First, verify that your assembly is not locked by another process
via gacutil.exe
If the above is OK make sure the file parent container has no permanent flag -
Permanent="no"