我有一个带有4个项目的C#解决方案,只有一个dll为3个项目和主项目的exe创建。我从未使用过WIX,但是遵循了简单的示例,并且能够编译我的代码,但只部署了.exe。我尝试过修改以添加其他项目:
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent">
<File Source="$(var.MedusaPerfApp.TargetPath)" />
<File Source="$(var.CustomClassLibrary.TargetPath)" />
<File Source="$(var.CustomControls.TargetPath)" />
<File Source="$(var.MultitaskingFramework.TargetPath)" />
</Component>
</ComponentGroup>
</Fragment>
我收到以下错误:
Error 3 The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with more than one file cannot use an automatically generated guid unless a versioned file is the keypath and the other files are unversioned. This component has a non-keypath file that is versioned. Create multiple components to use automatically generated guids.
答案 0 :(得分:4)
正如错误消息所示:Create multiple components to use automatically generated guids.
将每个File元素放在其自己的Component元素中。
答案 1 :(得分:0)
我遇到了同样的问题并找到了解决方案,而无需将每个文件包装在组件标记中。您所要做的就是为组件添加一个Guid。
<Component Id="appComponent" Guid="6263db4e-4c67-4adc-9ef1-e1caef798331">
Here是您可以关注的示例