title: How to compile a Delphi projectgroup using MSBuild called from an Embarcadero Makefile
body: <p>I am trying to compile the two components from Virtual Treeview (VirtualTreesR.bpl and VirtualTreesD.bpl) which I combined in a Delphi project group called VirtualTrees.groupproj. They should be compiled using MSBuild, but this call is done from a (Embarcadero) Makefile. The relevant part in the Makefile looks like:</p>
  
  <pre><code>msbuild.exe /nologo /v:m /t:build /p:Config=Release "$(VTVDIR)\Packages\Delphi 2010\VirtualTrees.groupproj"
  </code></pre>
  
  <p>Unfortunately this results in MSB4040, because the environment variable BDS is not set in cmd.exe, but it is in the Makefile. I tried a SET BDS=$(BDS) before the call to msbuild, but to no avail. I also tried to set BDS as property(/p:BDS=($BDS);Config=Release) which caused another error (something liks: Could not find compiler at %BDS%\bin\dcc32.exe).</p>
  
  <p>This call from the Makefile is part of a preparation to build our product on a CI server, and I cannot guarantee that the BDS variable is set there. So how can I provide the BDS variable which I have in the Makefile to msbuild that it accepts it?</p>