title: Provide multiple build configurations to MSBuild through arguments and have them build in parallel
body: <p>I'm trying to setup a MSBuild .proj file that can have multiple build configurations passed in as arguments and then have the configs built in parallel. This is an example of what I want to do:</p>
  
  <p><code>msbuild MultiConfigBuild.proj /m:8 /ds /property:Config=Debug+Release;Platform=x64</code></p>
  
  <p>I have got it building multiple configurations but I'm unable to get them to build in parallel even with <code>BuildInParallel="true"</code> and <code>/m:8</code></p>
  
  <pre><code>&lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Rebuild" ToolsVersion="4.0"&gt;
      &lt;ItemGroup&gt;
          &lt;ConfigList Condition=" '@(ConfigList)' == '' and $(Config) != '' " Include="$(Config.Split('+'))" /&gt;&lt;!-- parse all requested configurations into a list --&gt;
          &lt;ConfigList Condition=" '@(ConfigList)' == '' " Include="Debug" /&gt;&lt;!-- if no configurations were specified, default to Debug --&gt;
      &lt;/ItemGroup&gt;
      &lt;!--
  
      Build the project for each requested configuration. --&gt;
      &lt;Target Name="Rebuild"&gt;
          &lt;MSBuild Projects="$(MSBuildProjectDirectory)\Application.sln" Targets="Rebuild" Properties="Configuration=%(ConfigList.Identity);Platform=x64" BuildInParallel="true" /&gt;
      &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>Using the above proj file and command line parameters I get this output for the node utilisation: </p>
  
  <pre><code>         ============================== Node Utilization (IDs represent configurations) ====================================================
           Timestamp:            1        Duration   Cumulative
           -----------------------------------------------------------------------------------------------------------------------------------
           636942946549229765:   0        0.201s     0.201s ####
           636942946551243522:   1        0.006s     0.207s
           636942946551303033:   2        0.354s     0.561s #######
           636942946554839510:   |        0.674s     1.235s #############
           636942946561575184:   |        0.048s     1.282s
           636942946562051339:   |        3.362s     4.645s ###################################################################
           636942946595675132:   |        0.508s     5.152s ##########
           636942946600754168:   1        0.001s     5.153s
           636942946600764083:   0        0.007s     5.160s
           636942946600833525:   3        0.002s     5.163s
           636942946600858339:   4        0.136s     5.299s ##
           636942946602217371:   |        0.420s     5.719s ########
           636942946606418477:   |        0.023s     5.742s
           636942946606651600:   |        2.443s     8.185s ################################################
           636942946631079558:   |        1.692s     9.877s #################################
           636942946648003047:   0        0.000s     9.878s
           -----------------------------------------------------------------------------------------------------------------------------------
           Utilization:          100.0    Average Utilization: 100.0
  </code></pre>
  
  <p>It's building the 2 configurations in serial on the same node.</p>
  
  <p>I have tried the solution given in <a href="https://stackoverflow.com/questions/12984882/how-can-i-build-multiple-configurations-in-parallel">this question</a> and that does build the configurations in parallel, but I was not able to set it up to parse multiple configs passed in as arguments.</p>