如何在安装中诊断共享DLL计数问题?

问题描述 投票:0回答:2

我是Installshield的新手。在尝试将新使用的库添加到安装项目时,我发现它在安装过程中似乎每次都会添加两个引用,并且只在卸载时减去一个,导致它被遗忘。当我进行安装时,我可以看到计数从不存在变为2。我用来添加库的方法很简单,就是在文件系统中复制有问题的DLL,然后在相应文件夹的上下文菜单中选择“粘贴”选项。我已经验证了在组件上检查了Shared,就像其他已经存在的文件一样。过去,我的经验有点缺乏。我已经为MSI和安装程序可执行文件生成了日志文件,但是在安装或卸载时没有任何关于该库名称的信息。但话说回来,我不知道我不知道的是什么。

安装 - SetupMSI.log

  Line 863: MSI (s) (FC:8C) [16:38:55:215]: Component: SharpDX.Mathematics.dll; Installed: Absent;   Request: Local;   Action: Local
  Line 11983: MSI (s) (FC:8C) [16:39:17:285]: Executing op: ComponentRegister(ComponentId={913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA},KeyPath=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,State=3,,Disk=1,SharedDllRefCount=1,BinaryType=0)
  Line 11984: 1: {0CDD5F31-CE6E-433D-9BB6-31BB73DF15CE} 2: {913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA} 3: C:\Program Files\Company\Product\SharpDX.Mathematics.dll 
  Line 17803: MSI (s) (FC:8C) [16:39:22:423]: Executing op: FileCopy(SourceName=SHARPD~4.DLL|SharpDX.Mathematics.dll,SourceCabKey=sharpdx.mathematics.dll,DestName=SharpDX.Mathematics.dll,Attributes=16384,FileSize=220672,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,Version=4.0.1.0,Language=0,InstallMode=58982400,,,,,,,)
  Line 17804: MSI (s) (FC:8C) [16:39:22:423]: File: C:\Program Files\Company\Product\SharpDX.Mathematics.dll;   To be installed;    Won't patch;    No existing file
  Line 17805: MSI (s) (FC:8C) [16:39:22:423]: Source for file 'sharpdx.mathematics.dll' is compressed
  Line 17806: InstallFiles: File: SharpDX.Mathematics.dll,  Directory: C:\Program Files\Company\Product\,  Size: 220672
  Line 18231: MSI (s) (FC:8C) [16:39:22:960]: Executing op: AssemblyPublish(Feature=AlwaysInstall,Component={913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA}[~]2,AssemblyType=3,AppCtx=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,AssemblyName=SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL",)
  Line 18231: MSI (s) (FC:8C) [16:39:22:960]: Executing op: AssemblyPublish(Feature=AlwaysInstall,Component={913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA}[~]2,AssemblyType=3,AppCtx=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,AssemblyName=SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL",)
  Line 18232: MsiPublishAssemblies: Application Context:C:|Program Files|Company|Product|SharpDX.Mathematics.dll, Assembly Name:SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL"
  Line 18233: MSI (s) (FC:8C) [16:39:22:960]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files|Company|Product|SharpDX.Mathematics.dll 3: 2 

卸载 - SetupMSI.log

Line 494: MSI (s) (00:9C) [15:39:12:650]: Component: SharpDX.Mathematics.dll; Installed: Local;   Request: Absent;   Action: Null     
Line 1257: MSI (s) (00:9C) [15:39:13:306]: Executing op: AssemblyUnpublish(,,AssemblyType=3,AppCtx=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,AssemblyName=SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL",Descriptor=M?N.'7gz[9hix1e`8%8k>gySbVDPar@wN}IS-}Jz_)     
Line 1258: MSI (s) (00:9C) [15:39:13:307]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files|Company|Product|SharpDX.Mathematics.dll 3: 2      
Line 1259: MSI (s) (00:9C) [15:39:13:307]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files|Company|Product|SharpDX.Mathematics.dll 3: 2 

有关为什么会发生这种情况的任何见解,或者我可能会在哪里寻找更多信息?

shared-libraries installshield
2个回答
1
投票

这是否发生在干净的快照虚拟机上?

通常,当测试机器变脏时会发生这种情况。如果有人或某些东西复制了DLL但从未将其注册为共享,那么MSI将不会覆盖该文件(如果更新)并将计数减少到2.在卸载时它会减少到1并且文件被遗忘因为假定它是之前它需要在那之后。

在干净的机器上它应该是1然后降到0并且一切都被移除。


0
投票

我遗憾地说这个问题似乎已经消失了。我现在无法复制它。可能,我在某处有一个脏构建,它添加了两个引用,并且在进一步重新编译时,我打开了一个干净的构建,但似乎文件被覆盖了。如果出现新的问题,我会更新这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.