title: Running MSBuild programmatically
body: <p>I am trying to execute MSBuild programmatically and can't execute the following command:</p>
  
  <pre><code>string command = string.Format(@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe  ""{0}\{1}.csproj""", _args.ProjectPath, _args.ProjectName);
  </code></pre>
  
  <p>The string gets rendered as:</p>
  
  <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe  "C:\...\TestResults\Foo 2011-08-31 16_29_40\Out\Foo\solutionName\projectName\projectName.csproj"
  </code></pre>
  
  <p>I then use new ProcessStartInfo(command). The problem seems to be the space between Foo and 2011. I get the following output:</p>
  
  <pre><code>MSBUILD : error MSB1008: Only one project can be specified.
  Switch: 16_29_40\Out\Foo\solutionName\projectName\projectName.csproj
  </code></pre>
  
  <p>How do I pass in the project file to MSBuild?</p>