Wix3.5: Undefined preprocessor variable '$ (var.Platform)'

I am trying to write an MSI installer for an x64 system

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?if $(var.Platform)=x64 ?>
  <?define win64Flag = "yes" ?>
  <?else ?>
  <?define win64Flag = "no" ?>
  <?endif ?>

</Wix>

This should be a fairly simple way to use the Platform built-in variable, but it did not work as follows:

D:\>candle m.wxs
Microsoft (R) Windows Installer Xml Compiler version 3.5.2519.0
Copyright (C) Microsoft Corporation. All rights reserved.

m.wxs
D:\m.wxs(4) : error CNDL0150 : Undefined preprocessor variable '$(var.Platform)'.

So this means that the "Platform" is not a built-in variable? Or something I did wrong?

+3
source share
1 answer

No, it is not built-in. You probably don't need this. See http://www.joyofsetup.com/2010/05/14/working-hard-or-hardly-working/ for how the candle handles most of the details for you.

+2
source

All Articles