要将文件添加到WiX,您需要使用 heat.exe 效用 ( http://wixtoolset.org/documentation/manual/v3/overview/heat.html )
heat.exe
这是我在PowerShell中使用的示例
& "$env:WIX\bin\heat.exe" dir $sourceDir -ag -dr INSTALLDIR -srd -sfrag -suid -cg ProductComponents -out ProductComponents.wxs