title: How to invoke MSBuild from PowerShell using & operator?
body: <p>I've just tested this on PowerShell v1.0. Setup is as follows:</p>
  
  <pre><code> Id CommandLine
   -- -----------
    1 $msbuild = "C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe"
    4 $a = "C:\some\project\or\other\src\Solution.sln /target:Clean /target:Build"
  </code></pre>
  
  <p>.</p>
  
  <p><strong>This line fails with an unintuitive error message:</strong></p>
  
  <pre><code> Id CommandLine
   -- -----------
    5 &amp; $msbuild $a
  </code></pre>
  
  <p>.</p>
  
  <p><strong>This line fails because &amp; expects the first argument to be the command itself.</strong></p>
  
  <pre><code> Id CommandLine
   -- -----------
   10 &amp; "$msbuild $a"
  </code></pre>
  
  <p>.</p>
  
  <p><strong>This line works:</strong></p>
  
  <pre><code> Id CommandLine
   -- -----------
   16 cmd /c "$msbuild $a"
  </code></pre>
  
  <p>.</p>
  
  <p>Please explain. I'm more interested in why the &amp; syntax isn't working, than an MSBuild-specific workaround.</p>