在wix中使用Heat时如何避免不必要的标签

时间:2013-09-24 09:59:23

标签: wix heat

我正在使用HEAT为文件目录自动生成WiX片段。 当 - 。wxs文件创建时,为什么它在组件中包含一些不必要的标签? 如下

方案1

 <Component Id="cmpFF03591E2D2B9B2AA2AA444299A693DB" Directory="dir7307A6085BD4ABD9B8955C093FD541F5" Guid="*">
   <Class Id="{00AB5D3B-4FAB-35AB-8916-59EE0247EFF1}" Context="InprocServer32" Description="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSourceElement" ThreadingModel="both" ForeignServer="mscoree.dll">
     <ProgId Id="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSourceElement" Description="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSourceElement" />
   </Class>
   <Class Id="{0ED3627E-5196-3A33-8EDC-7DC7DFCE3A97}" Context="InprocServer32" Description="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ByteArrayTypeConverter" ThreadingModel="both" ForeignServer="mscoree.dll">
     <ProgId Id="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ByteArrayTypeConverter" Description="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ByteArrayTypeConverter" />
   </Class>
   <Class Id="{10FA9802-2D3A-3CE4-95BB-7170AA4AE251}" Context="InprocServer32" Description="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.ConfigurationChangeEventSourceImpl" ThreadingModel="both" ForeignServer="mscoree.dll">
     <ProgId Id="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.ConfigurationChangeEventSourceImpl" Description="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.ConfigurationChangeEventSourceImpl" />
   </Class>

...........许多课程文件

 <File Id="fil7DC27EB4CA5B9970A7CBD422D919CCFF" KeyPath="yes" Source="$(var.SourcePath)\bin\Microsoft.Practices.EnterpriseLibrary.Common.dll" />
   <ProgId Id="Record" />
   <RegistryValue Root="HKCR" Key="CLSID\{00AB5D3B-4FAB-35AB-8916-59EE0247EFF1}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
   <RegistryValue Root="HKCR" Key="CLSID\{00AB5D3B-4FAB-35AB-8916-59EE0247EFF1}\InprocServer32\5.0.414.0" Name="Class" Value="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSourceElement" Type="string" Action="write" />
   <RegistryValue Root="HKCR" Key="CLSID\{00AB5D3B-4FAB-35AB-8916-59EE0247EFF1}\InprocServer32\5.0.414.0" Name="Assembly" Value="Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Type="string" Action="write" />
   <RegistryValue Root="HKCR" Key="CLSID\{00AB5D3B-4FAB-35AB-8916-59EE0247EFF1}\InprocServer32\5.0.414.0" Name="RuntimeVersion" Value="v2.0.50727" Type="string" Action="write" />

..........许多注册表项

</Component>

2 个答案:

答案 0 :(得分:5)

我会复制粘贴我的问题(Wix\heat.exe strange output)中的答案,因为它对我有用。正如Yan Sklyarenko所说:

Supply heat.exe with -sreg and -scom command line switches. See heat.exe -? for more options

答案 1 :(得分:1)

类和注册表意味着二进制文件是COM二进制文件。它是C#COM二进制文件,因为我可以看到ForeignServer =&#34; mscoree.dll&#34;。

如果您不想要COM二进制文件,可以在项目中指定assemlyinfo.cs,标记COMVisible = false。