How to avoid unnecessary tags when use Heat in wix

隐身守侯 提交于 2019-12-24 00:34:46

问题


I'm using HEAT to auto generate WiX fragments for a directory of files. When the --.wxs file creating, why it include some unnecessary tags within the component? like follows

scenario 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>

...........lots of class files

 <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" />

..........lots of Registry keys

</Component>

回答1:


I will copy paste the answer from my question (Wix\heat.exe strange output) because it worked for me. As Yan Sklyarenko said:

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



回答2:


The Classes and Registries means the binaries is a COM binary. it's a C# COM binary since I can see ForeignServer="mscoree.dll".

if you don't want a COM binary, you can specify in your project assemlyinfo.cs marking COMVisible = false.



来源:https://stackoverflow.com/questions/18978418/how-to-avoid-unnecessary-tags-when-use-heat-in-wix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!