[wix-users] Error accessing variable in include file
phill.hogland at rimage.com
Mon Apr 18 06:15:43 PDT 2016
The approach I use is to unload my .wixproj file and edit it adding the following PropertyGroup, after the last 'configuration' PropertyGroup and before any of the ItemGroup(s):
.... (if the above path includes a trailing backslash, then use two backslashes
Then in the .wxs file do:
<?include BuildVariables.wxi ?>
At compile time the log output will include a list of all the paths at which the compiler is looking for .wxi files so you can validate that the Environment variable $(RootDir) is being resolved as you wish.
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Drummond, Jeffrey <Jeffrey.Drummond at chasepaymentech.com>
Sent: Friday, April 15, 2016 3:34:28 PM
To: WiX Toolset Users Mailing List
Subject: [wix-users] Error accessing variable in include file
I am receiving the following error when trying to access a variable in
an included file. This should be simple, but it isn't so far:
D:\Build\Development\Company\BuildServerConfigurationTest.targets (569): The expression """.PROJECTTOPACKAGEFOLDERVARIABLE" cannot be evaluated. Method 'System.String.PROJECTTOPACKAGEFOLDERVARIABLE' not found.
My include file:
<?xml version="1.0" encoding="utf-8"?>
<?define PROJECTTOPACKAGEFOLDERVARIABLE = "DefaultValue" ?>
It is implemented above the <Product> tag in my main targets file:
<?include $(RootDir)Development\Company\BuildVariables.wxi ?>
And I am testing getting the variable here:
<Message Text="The value of the variable from the include file is: $(var.PROJECTTOPACKAGEFOLDERVARIABLE)" />
Thanks in advance for your help.
Learn more about Chase Paymentech Solutions,LLC payment processing services at www.chasepaymentech.com and Chase Paymentech Europe Limited payment processing services at www.chasepaymentech.co.uk.
THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.
Chase Paymentech Europe Limited, trading as Chase Paymentech, is regulated by the Central Bank of Ireland.
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users