title: Environment variables in Visual Studio solution files
body: <p>I have a Visual Studio solution which has the following entry for one specific project:</p>
  
  <pre><code>Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XXXData",
  "%XXX_LIBS_DIR%\XXXData\XXXData\XXXData.csproj", "{AA390915-1F94-459F-A3D8-B2027A90A6AF}"
  EndProject
  </code></pre>
  
  <p>This works fine in Visual Studio but falls over building with MSBUILD, as you get:</p>
  
  <pre><code>E:\path\project.sln.metaproj : error MSB2302: The project file
  "E:\path\%XXX_LIBS_DIR%\XXXData\XXXData.csproj" was not found
  </code></pre>
  
  <p>It looks like %XXX_LIBS_DIR% is not being translated by MSBUILD so it can't find the project file.</p>
  
  <p>I did try replacing %XXX_LIBS_DIR% with $(XXX_LIBS_DIR) however this doesn't work in Visual Studio.</p>
  
  <p>One thought that I considered was to pre process the solution and replace %XXX_LIBS_DIR% with an absolute or relative path and see if that works, I was wondering if there was a better solution than that?</p>