【问题标题】:WiX: Heat causes ICE69 warning for files with the same namesWiX:Heat 会导致同名文件出现 ICE69 警告
【发布时间】:2017-12-15 14:50:36
【问题描述】:

我正在为 WPF 应用程序开发基于 WiX 的安装程序。文件数量巨大且不断变化,因此我使用heat 实用程序来生成组件。

& "$env:WIX\bin\heat.exe" dir $sourceDir -ag -dr INSTALLDIR -srd -sfrag -suid -cg ProductComponents -out Components.wxs

有许多具有相同名称但存储在不同文件夹中的东西。在构建过程中,light 实用程序会打印以下消息之一

warning LGHT1076 : ICE69: Mismatched component reference. Entry 'regCA7432986A287E1C45911B23DB39A11B' of the Registry table belongs to component 'AutoMapper.dll_1'. However, the formatted string in column 'Value' references file 'AutoMapper.dll' which belongs to component 'AutoMapper.dll'. Components are in the same feature. 

在生成的文件中有这样的记录

<Component Id="AutoMapper.dll_1" Guid="*">
...
<File Id="AutoMapper.dll_1" KeyPath="yes" Source="SourceDir\Plugins\PluginName\AutoMapper.dll" />
<ProgId Id="Record" />
<RegistryValue Root="HKCR" Key="CLSID\{00ACB8EF-737F-3327-B129-C59300C5D5ED}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{00ACB8EF-737F-3327-B129-C59300C5D5ED}\InprocServer32\6.1.1.0" Name="Class" Value="AutoMapper.Configuration.MapperConfigurationExpression" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{00ACB8EF-737F-3327-B129-C59300C5D5ED}\InprocServer32\6.1.1.0" Name="Assembly" Value="AutoMapper, Version=6.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{00ACB8EF-737F-3327-B129-C59300C5D5ED}\InprocServer32\6.1.1.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{00ACB8EF-737F-3327-B129-C59300C5D5ED}\InprocServer32\6.1.1.0" Name="CodeBase" Value="file:///[#AutoMapper.dll]" Type="string" Action="write" />
...

如您所见,代码的最后一行是[#AutoMapper.dll] 而不是[#AutoMapper.dll_1],并且对于其他具有相同名称的文件,此行为是相同的。我可以做些什么来防止这种行为并生成正常的注册表记录?

顺便说一句,这是一个真正的问题还是我可以忽略它?

【问题讨论】:

  • 只要文件在两个位置完全相同,忽略 ICE69 是安全的,只要您不会遇到它们具有不同功能并且可能安装带有引用的那个的情况到另一个而不安装另一个包含的功能。
  • 您无法生成静态注册表值,因为 [#AutoMapper.dll] 值取决于 dll 的安装位置,这是您实际安装产品时的运行时值。

标签: wix windows-installer registry heat


【解决方案1】:

我记得在-suid 上也遇到过这个问题,你能在不影响你的用例的情况下放弃这个论点吗?如果您需要在某处引用具有预期值的文件 ID,您始终可以使用小的转换来提供帮助。

【讨论】:

  • 好吧,删除 -suid 并不能解决问题。在构建过程中仍会打印大量警告
猜你喜欢
  • 2019-08-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-04-16
  • 1970-01-01
  • 2015-10-04
  • 1970-01-01
  • 2020-03-10
相关资源
最近更新 更多