title: Visual Studio Command Prompt gives "\Common was unexpected at this time"
body: <p>I need to run MSBuild from the command line using the Visual Studio Command Prompt (2010). It used to work fine. Now when I open the window I get the following error message:</p>
  
  <pre><code>\Common was unexpected at this time.
  </code></pre>
  
  <p>Trying to run the <code>msbuild</code> command after that fails. </p>
  
  <p>I naturally assumed it was an issue with an unquoted entry in my PATH environment variable, possibly from a recent rogue install. I checked that, but the PATH seems to be kosher.</p>
  
  <p>Digging into the file system, I discovered that the batch file being run by the prompt is C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat. I edited that by putting in <code>ECHO</code> statements to trace the location of the error. That seemed to point to an error at this line:</p>
  
  <pre><code>@if not "%WindowsSdkDir%" == "" (
  </code></pre>
  
  <p>If I remove the quotation marks, the error is different: "Files was not expected at this time."</p>
  
  <p>The next 2 lines after this are now:</p>
  
  <pre><code>@echo 51
  @set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools;%WindowsSdkDir%bin;%PATH%"
  </code></pre>
  
  <p>I assumed the failing statement was the second line, but the <code>echo</code> statement doesn't produce any output, so I don't know how that could be happening.</p>
  
  <p>I am using a 64-bit version of Windows 7.</p>
  
  <p>I would appreciate any help at all.</p>