Menu

#1130 $(var.SolutionDir) and friends...

v3.0
closed
votive (347)
2012-09-15
2008-03-05
No

I came across Aaron Stebner's blog where he outlined some useful Wix constructs, such as $(var.SolutionDir) and friends. However, when I tried to use them, the compiler gave me the following error:

The file Undefined if not building from within Visual Studio\<path_to_my_file> could not be found.</path_to_my_file>

I stopped using it. However, today, I've been trying to figure out how Wix works some more and I noticed on the output tab of Microsoft Visual Studio 2005 SP1 after compiling my wxs file that I had a lot of these statements. Here's an example of a command that candle is using:

C:\Program Files\Windows Installer XML v3\bin\candle.exe -dDebug -d"DevEnvDir=Undefined if not building from within Visual Studio" -d"SolutionDir=Undefined if not building a solution or within Visual Studio" -d"SolutionExt=Undefined if not building a solution or within Visual Studio" -d"SolutionFileName=Undefined if not building a solution or within Visual Studio" -d"SolutionName=Undefined if not building a solution or within Visual Studio" -d"SolutionPath=Undefined if not building a solution or within Visual Studio" -out obj\Debug\TtecUI_Advanced.wixobj -v TtecUI_Advanced.wxs

I should note that I'm running Vista SP1 as well. I got no errors during the install of ProjectAggregator or Wix3 that I am aware of (i.e. I didn't get any error dialog boxes and Vista didn't complain, it only took longer than I would have thought to install). I don't know if this is a bug in Wix, in the installation of Wix on Vista w/ VS2005, or just a hiccup in my installation.

If this is not the case for others, could you perhaps point me in the right direction to troubleshooting this?

Thanks in advance.

~ Craig S.

Discussion

  • Doug Semler

    Doug Semler - 2008-03-06

    Logged In: YES
    user_id=1342505
    Originator: NO

    This pretty much is a repeat of 1717966 - for some reason you need to have a managed project (VB, C#, J#) in the solution for the $(var.Solution*) variables to be set properly.

    In addition, after adding the project, you need to reload the Wix project for the variables to be refreshed.

     
  • Doug Semler

    Doug Semler - 2008-03-06

    Logged In: YES
    user_id=1342505
    Originator: NO

    This pretty much is a repeat of 1717966 - for some reason you need to have a managed project (VB, C#, J#) in the solution for the $(var.Solution*) variables to be set properly.

    In addition, after adding the project, you need to reload the Wix project for the variables to be refreshed.

     
  • Jason Ginchereau

    Logged In: YES
    user_id=2086430
    Originator: NO

    This was fixed about a month ago. You should get solution variables now in all cases with the exception of running MSBuild on a single project on the command-line.

     
MongoDB Logo MongoDB