What if you add

  <PropertyGroup>
    <DefineSolutionProperties>false</DefineSolutionProperties>
  </PropertyGroup>
To your .wixproj?  I expect you're hitting an interplay between solutions
and projects. That MSBuild property disables Visual Studio from creating
magical properties only available when you build the .sln file. If that is
set and the build fails then my hypothesis is correct and .sqlproj
variables are dependent on solutions today the way .vcproj files were in
the past.


On Wed, Aug 22, 2012 at 1:16 PM, Edwin G. Castro <edwin.cas...@fiserv.com>wrote:

> 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
>



-- 
virtually,

   Rob Mensching
   http://RobMensching.com LLC
------------------------------------------------------------------------------
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

Reply via email to