Ruslan Albu <ruslan.albu <at> kurtosys.com> writes: > > But it doesn't work when I build it using MSBuild task. In my build > definition I use the following: > > <MSBuild Projects="@(WixProject)" Condition="'$(CreateSetup)'=='true'" > Properties > ="MsiInstallVersion=$(Major).$(Minor).$(Build).$(Revision);AutoBuild=Tru > e"/> > > I'm getting this error when using MSBuild: > > Product.wxs(361): error CNDL0150: Undefined preprocessor variable > '$(var.InstallDataBase.TargetDir)'. > > I checked the build outputs from both VS and MSBuild and the difference > is that when building in MSBuild the candle.exe doesn't have the > properties for the library project (for instance > -dLibraryProjectName.ProjectDir, etc.). > I'm running into this same problem.
I have a WiX project with a reference to a .sqlproj. When I build the solution the WiX project builds as expected but when I build it on the command line I get error CNDL0150: Undefined preprocessor variable similar to above. Similarly, when I checked the output for Visual Studio and compared it to the output from MSBuild I noticed that the project preprocessor variables are not getting defined in MSBuild. I see in wix2010.targets that the CreateProjectReferenceDefineConstants task is responsible for setting the ProjectReferenceDefineConstants property. I can also see that the CreateProjectReferenceDefineConstants task uses @(_ResolvedProjectReferencePaths) as ProjectReferencePaths. My guess is that the wix2010.targets is failing to resolve my project dependency on the command line but it succeeds in Visual Studio. I can't figure out why the difference occurs. Has anybody else experienced this? If so, how did you resolve it? -- Edwin G. Castro ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users