Maybe not a bug: $(xxx) attempts to resolve as variable "xxx"

I am trying to use FinalBuilder to automate the build of a WiX project and I’m running into an issue that, if not a bug, is at least undocumented as far as I can find.

Basically I am trying to replace some a path with a WiX variable, except that FinalBuilder decides to try and interpret the text as a variable.

In particular the FB project does the following things:
- Captures the output from the WiX Tallow utility (which is essentially an XML file)
- Trim the log headers from FB so it’s just the raw XML.
- Define an XML Document using the XML captured earlier.
- Iterate through the File nodes of the XML and for each node…
- Read the src attribute (which returns a path to a file like “X:\some\path\somefile.ext”)
- Extract a substring from that (such as “path\somefile.ext”)
- concatenate that substring preceeded with “$(var.SomeWiXVar)” and set the src attribute to the result.

The problem is that when I attempt to do that FB throws "Error expanding New Value : Variable : var.SomeWiXVar - does not exist!"

I can not find any documentation that says that $(xxx) will resolve to a variable in any of the FinalBuilder documentation, but is there something that I’m missing? I have tried to escape the characters every way that I can think of but that doesn’t seem to work either.

I’m using 5.0.0.60 on Win2k3 server SP1, though I’ve been able to replicate it on XP SP2 as well.

Hi Nathan,

$(VarName) is a (now deprecated) method of referencing FinalBuilder variables. It should be mentioned in the documentation, but I’ll go and check if it needs to be mentioned more.

To make an expression which evaluates to $(VarName), double-escape the $ as $$(VarName). This will expand to $(VarName) at runtime.

Regards,


Angus