In by bundle.wxs I am trying to set a custom variable which is base on the configuration being built like this:
<Variable Name="SETTINGPROVIDERURL" Value="$(var.siteloc)"/>
I am trying to set "siteloc" on the Properties > build tab in the VS2017 project. I am trying both preprocessor and wixvariable to get at least one to come through.
in the wixproj file, I can see these:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WixVariables>siteloc=bar;</WixVariables>
<DefineConstants>siteloc=foo;</DefineConstants>
</PropertyGroup>
When I build, I get CNDL0150: Undefined preprocessor variable '$(var.siteloc)'. As you can see, my variable (either one) was not added as a parameter to candle in the VS Console:
2>------ Build started: Project: KioskHostBootstrapper, Configuration: Release x86 ------
2> C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -dBuildVersion=5.0.307.1 -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\\" -dSolutionDir=C:\centrics\CentricsStoreFront_5_0\Source\ -dSolutionExt=.sln -dSolutionFileName=CentricsStoreFront_5_0.sln -dSolutionName=CentricsStoreFront_5_0 -dSolutionPath=C:\centrics\CentricsStoreFront_5_0\Source\CentricsStoreFront_5_0.sln -dConfiguration=Release -dOutDir=bin\Release\ -dPlatform=x86 -dProjectDir=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostBootstrapper\ -dProjectExt=.wixproj -dProjectFileName=KioskHostBootstrapper.wixproj -dProjectName=KioskHostBootstrapper -dProjectPath=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostBootstrapper\KioskHostBootstrapper.wixproj -dTargetDir=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostBootstrapper\bin\Release\ -dTargetExt=.exe -dTargetFileName=KioskHostSetup.exe -dTargetName=KioskHostSetup -dTargetPath=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostBootstrapper\bin\Release\KioskHostSetup.exe -dKioskHostInstaller.Configuration=Release -d"KioskHostInstaller.FullConfiguration=Release|x86" -dKioskHostInstaller.Platform=x86 -dKioskHostInstaller.ProjectDir=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostInstaller\ -dKioskHostInstaller.ProjectExt=.wixproj -dKioskHostInstaller.ProjectFileName=KioskHostInstaller.wixproj -dKioskHostInstaller.ProjectName=KioskHostInstaller -dKioskHostInstaller.ProjectPath=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostInstaller\KioskHostInstaller.wixproj -dKioskHostInstaller.TargetDir=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostInstaller\bin\Release\ -dKioskHostInstaller.TargetExt=.msi -dKioskHostInstaller.TargetFileName=KioskHostInstaller.msi -dKioskHostInstaller.TargetName=KioskHostInstaller -dKioskHostInstaller.TargetPath=C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostInstaller\bin\Release\KioskHostInstaller.msi -out obj\Release\ -arch x86 -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUtilExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixBalExtension.dll" Bundle.wxs
2>C:\centrics\CentricsStoreFront_5_0\Source\StoreFrontUtilities\KioskHost\WiXInstaller\KioskHostBootstrapper\Bundle.wxs(20,0): error CNDL0150: Undefined preprocessor variable '$(var.siteloc)'.
2>Done building project "KioskHostBootstrapper.wixproj" -- FAILED.
I tried this SF Suggestion,
<PropertyGroup>
<siteloc>fubar</siteloc>
</PropertyGroup>
but it didn't work.
What am I missing?