Why not use a binder variable?

Mar 20, 2009 at 6:19 PM
I'm curious why a binder variable like !(bind.FileVersion.FileId) wouldn't work? The advantage of binder variables is:

1.  they are built in (no extension necessary)

2.  they access the files during the bind process, which means your files don't have to exist when compiling.

Coordinator
Mar 27, 2009 at 1:46 PM
Cool - I didn't know you could do that. 

I had done a lot of research on how to get the version and all I found were things like using environment variables or having a batch process to replace the version in your script before building. 

It seems that WiX has a bit to go on documentation because this stuff is really hard to find.
Mar 27, 2009 at 1:50 PM
Well, this use of binder variables is a relatively new feature that hasn't made it's way into the documentation well. I guess we really need a How-To topic dedicated to build version and the multitude of ways to come up with one. Then this would be far more discoverable.
Feb 15, 2012 at 7:09 PM

Also, when using WIX Burn bootstrapper, the file does not have an id to refer to. That's why I started using this extension.

May 28, 2015 at 7:22 AM
thanks to this extenson i found nice article
May 24 at 7:41 PM
I know this is so old but I just came across it and I just found the solution (in my case)
You have to add a reference to the corresponding project.
The same if you use a boos trapper, you have to add a reference to the actual Installer project or you'll get these preprocessor exceptions.