如何诊断安装中的共享 DLL 计数问题?
How do I diagnose a Shared DLL count issue in the install?
我是 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
是否知道为什么会发生这种情况,或者我可以在哪里寻找更多信息?
这是否发生在干净的快照虚拟机上?
通常这发生在测试机器脏的时候。如果某人或某物复制了一个 DLL 但从未将其注册为共享文件,那么 MSI 将不会覆盖该文件(如果较新)并将计数增加到 2。在卸载时它会减少到 1 并且该文件会被留下,因为它假定它是在那之前它需要在那之后。
在干净的机器上,它应该先到 1,然后再到 0,然后删除所有内容。
很遗憾,这个问题似乎已经自行消失了。我现在无法复制它。可能我在某个地方有一个脏构建,它添加了两个引用,并且在进一步重新编译后,我得到了一个干净的构建,但似乎文件被覆盖了。如果出现新的问题,我会更新这个问题。
我是 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
是否知道为什么会发生这种情况,或者我可以在哪里寻找更多信息?
这是否发生在干净的快照虚拟机上?
通常这发生在测试机器脏的时候。如果某人或某物复制了一个 DLL 但从未将其注册为共享文件,那么 MSI 将不会覆盖该文件(如果较新)并将计数增加到 2。在卸载时它会减少到 1 并且该文件会被留下,因为它假定它是在那之前它需要在那之后。
在干净的机器上,它应该先到 1,然后再到 0,然后删除所有内容。
很遗憾,这个问题似乎已经自行消失了。我现在无法复制它。可能我在某个地方有一个脏构建,它添加了两个引用,并且在进一步重新编译后,我得到了一个干净的构建,但似乎文件被覆盖了。如果出现新的问题,我会更新这个问题。