WiX: Define made in included file not avaible from wxs-fragment-file.

Posted by leiflundgren on Stack Overflow See other posts from Stack Overflow or by leiflundgren
Published on 2010-04-17T16:47:16Z Indexed on 2010/04/19 19:03 UTC
Read the original article Hit count: 350

Filed under:

I have a defines.wxi-file which contains some good definitions used in all my wxs-files.

When I attempt to reference the defined value from one of the <Fragment>-files I get Undefined preprocessor variable '$(var.IMAGE_FOLDER)' back in my face.

I guess there is something trivial I am missing here... Any ideas?

Edit 19:th April.
Found that issue only occurs if reference from a Fragment-file.
Re-wrote sample to match that.


defines.wxi

<Include>
    <?define IMAGE_FOLDER="Images" ?> 
</Include>

some-Fragment.wxs

<Fragment>
  <?Include defines.wxi ?>

  <Component Id='c.Images' Guid=".." Directory='INSTALLDIR.Images' >
     <File Id='f.sample.jpg' Source='$(var.IMAGE_FOLDER)sample.jpg' Name='sample.jpg' />
  </Component>

© Stack Overflow or respective owner

Related posts about wix