Wix heat.exe with project harvesting type

2019-04-20 19:18发布

I'm using the lastest version of Wix 3.5 and I'm trying to generate a fragment file using heat.exe. The command line is :

"%WIX%\bin\heat.exe" project "MyProj.csproj" -pog Binaries -pog Content -suid -directoryid 
INSTALLLOCATION -ag -template fragment -out "Files.wxs"

The prolem I'm having is that the assemblies my project is depending uppon are missing from the generated file. Is this the intended behaviour ? How can I add them ?

Should I use the dir harvesting type ?! How to remove *.pdb or *.vshost.exe then ?

I want to use it with CI Server (TeamCity)

edit: I tried -pog Satellites and doesn't work either

3条回答
太酷不给撩
2楼-- · 2019-04-20 19:20

I know this is an old question, but this thread might contain some ideas for possible solutions: How to add a whole directory or project output to WiX package

One of the tools mentioned, Paraffin 3.1, has various command line switches that should allow you to exclude the files that are not relevant. http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/06/28/paraffin3-1-new-and-improved.aspx

查看更多
一夜七次
3楼-- · 2019-04-20 19:29

Unfortunately this is a known issue with WiX:

Heat doesn't harvest referenced assemblies

From the bug comments, it looks like support will be added in WiX 4.0.

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-04-20 19:31

In our CI build we are using WiX with hand crafted wxs files.
Here is content of the build file:

<Target Name="BuildSetup"  DependsOnTargets="BuildSetupVersion">
    <Exec Command="$(WIX-ToolPath)\candle.exe -nologo -out $(MSBuildProjectDirectory)\bin\Debug\Designer.wxs UI_RUS.wxs Bin.wxs" WorkingDirectory = "$(MSBuildProjectDirectory)\bin\Debug"/>
    <Exec Command="$(WIX-ToolPath)\light.exe -wx -out Setup_$(Major).$(Minor).$(Build).$(Revision).msi Designer.wixobj UI_RUS.wixobj Bin.wixobj" WorkingDirectory = "$(MSBuildProjectDirectory)\bin\Debug"/>
    <Message Text="##teamcity[publishArtifacts '$(MSBuildProjectDirectory)\bin\Debug\Setup_$(Major).$(Minor).$(Build).$(Revision).msi']"/>-->
</Target>

Designer.wxs - contains program specific msi info (UpgradeCode, msi Version, and Package info).
UI_culture(RUS in this example).wxs - contains custom localized WiX UI.
Bin.wxs - contain all needed files.(you can automate it with wxi generation and using WiX's includes), but we simply write this file manually.

查看更多
登录 后发表回答