【发布时间】:2017-03-24 03:54:17
【问题描述】:
这是 cakebuild 脚本:
WiXHeat(Directory("../Release"), new FilePath("./xxx/Files.wxs"), WiXHarvestType.Dir, new HeatSettings
{
AutogeneratedGuid = true,
ComponentGroupName = "Binaries",
Transform = "./Filter.xslt",
SuppressCom = true,
SuppressFragments = true,
SuppressRegistry = true,
SuppressRootDirectory = true,
PreprocessorVariable = "var.xxx.TargetDir",
DirectoryReferenceId = "INSTALLFOLDER",
WorkingDirectory = "./xxx_Installer",
KeepEmptyDirectories = true,
GenerateGuid = true,
});
它使用参数:-ke -ag -gg。
Files.wxs 看起来像:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="INSTALLFOLDER">
<Directory Id="dir76A8B56EDC1C4DD3CB4177F3704BC91E" Name="data">
<Component Id="cmpE375532277DA492834892BE47B02E5DA" Guid="*" KeyPath="yes">
<CreateFolder />
</Component>
</Directory>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="Binaries">
<ComponentRef Id="cmpE375532277DA492834892BE47B02E5DA" />
</ComponentGroup>
</Fragment>
</Wix>
然后 Light 不适用于 Files.wxs,这是错误:
...\Files.wxs(29):错误 LGHT0230:Component/@Guid 属性的 值“*”对此组件无效,因为它不符合 具有自动生成的 guid 的标准。组件 使用 Directory 作为 KeyPath 或包含 ODBCDataSource 子 元素不能使用自动生成的 guid。确保您的 组件没有 KeyPath 的 Directory 并移动任何 ODBCDataSource 子元素到具有显式组件的组件 指导。执行任务“BuildInstaller”时发生错误。错误: 灯:进程返回错误(退出代码 230)。
似乎对于空目录,它必须有一个分配的公会,而不是根据this article的“*”。
我不想用 GUID 手动替换“*”,因为热/光过程与构建过程集成在一起,并且 Files.wxs 在源代码控制中。
你知道如何解决这个错误吗?
【问题讨论】:
标签: wix