安装程序已成功将程序集安装到 GAC 中。但是,卸载程序会将程序集保留在 GAC 中。
我错过了什么吗?我真的不想使用 gacutil.exe 在卸载时删除程序集。
Source: "..\TestHelperInject\bin\x86\Release\TestHelperInject.dll"; DestDir: "{app}"; Flags: gacinstall sharedfile uninsnosharedfileprompt; StrongAssemblyName: "TestHelperInject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ccbe9854a3cee58d, processorArchitecture=x86"
更新:好的,因此在卸载过程中从 GAC 中删除程序集适用于 WinXP,但不适用于 Win7。
最佳答案
来自 Inno 设置 documentation :
gacinstall
Install the file into the .NET Global Assembly Cache. When used in combination with
sharedfile
, the file will only be uninstalled when the reference count reaches zero.To uninstall the file Uninstaller uses the strong assembly name specified by parameter
StrongAssemblyName
.An exception will be raised if an attempt is made to use this flag on a system with no .NET Framework present.
因此看来 Inno Setup 会为您处理卸载。
关于.net - Inno Setup 卸载程序不会从 GAC 中删除程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9706083/