我使用 heat.exe 生成了一个 .wxs 文件,其中列出了我要安装的所有文件。我告诉 heat 把它们放在一个 ComponentGroup 中,这样我就可以从另一个(手工生成的).wxs 文件中引用它们。
但是,自动生成的文件规范如下所示:
<Component Id="cmp10D34854E51FC71E0A65900015642460" Directory="dir82EF0D8D89A5B984406E0CCDF2A5E5BC" Guid="*">
<File Id="fil65369E1F7C8702A7B78CF393C06A9C7B" KeyPath="yes" Source="SourceDir\CHANGELOG.md" />
</Component>
由于源以“SourceDir”开头,因此在 light.exe 中出现以下错误:
: error LGHT0231 : The component 'cmp10D34854E51FC71E0A65900015642460' has a key file with path 'TARGETDIR\vwf-windows-build\CHANGELOG.md'. Since this path is not rooted in one of the standard directories (like ProgramFilesFolder), this component does not fit the criteria for having an automatically generated guid. (This error may also occur if a path contains a likely standard directory such as nesting a directory with name "Common Files" under ProgramFilesFolder.)
知道我需要做什么才能使其正常工作吗?