How to avoid 'Win64' attribute is invalid

2019-07-01 17:07发布

I have a WiX installer and I am following wix-tricks-and-tips

My variables all work fine, but I am flooded with 100's of warnings due to this:

<Component Id="C.Content.2011.1.414" DiskId="1" Guid="MYGUID" Win64="$(var.Win64)" KeyPath="yes">

I receive the warning:

Warning 1 The 'Win64' attribute is invalid - The value '$(var.Win64)' is invalid according to its datatype 'http://schemas.microsoft.com/wix/2006/wi:YesNoType' - The '$' character, hexadecimal value 0x24, cannot be included in a name.

yet:

<?xml version="1.0" encoding="utf-8"?>
<Include>
  <?if $(var.Platform) = x64 ?>
    <?define Win64 = "yes" ?>
    <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
  <?else ?>
    <?define Win64 = "no" ?>
    <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
  <?endif ?>
</Include>

clearly Win64 is yes/no... how do I avoid this warning?

Thanks

1条回答
该账号已被封号
2楼-- · 2019-07-01 17:31

The answer is to just remove the Win64 variable altogether. Once you have your platform build targets setup properly WiX can just figure it out.

查看更多
登录 后发表回答