title: How to build multiple configurations?
body: <p>I want to build the SLN from command line. I have tried </p>
  
  <pre><code>D:\&gt;msbuild MySolution.sln
  </code></pre>
  
  <p>Problem is that it fails to build project <code>C</code> which is targeted for x86, while projects <code>A</code> and <code>B</code> are built right. It gives error:</p>
  
  <blockquote>
    <p>Project "D:.....\MySolution.sln" (1) is building
    "D:.....\MySolution\ToolC\C.csproj" (4) on node 0 (default
    targets).<br/>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(539,9):
    error : The OutputPath property is not set for this project.  Please
    check to make sure that you have specified a valid
    Configuration/Platform combination.  Configuration='Debug' 
    Platform='AnyCPU'<br/>Done Building Project
    "D:.....\MySolution\ToolC\C.csproj" (default targets) -- FAILED.</p>
  </blockquote>
  
  <p>Why is it building <code>C</code> for target "Any CPU"?
  <br/><br/><br/><strong>Details</strong><br/>
  I have 1 SLN file with 3 C# projects, say, A, B, C.</p>
  
  <p>Projects <code>A</code> and <code>B</code> are default targeted for "Any CPU". Project <code>C</code> is targeted for "x86"</p>
  
  <p>Here is the content of SLN file (only <code>Global</code> section):</p>
  
  <pre><code>Global
      GlobalSection(SolutionConfigurationPlatforms) = preSolution
          Debug|Any CPU = Debug|Any CPU
          Debug|x86 = Debug|x86
          Release|Any CPU = Release|Any CPU
          Release|x86 = Release|x86
      EndGlobalSection
      GlobalSection(ProjectConfigurationPlatforms) = postSolution
          {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
          {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
          {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}.Debug|x86.ActiveCfg = Debug|Any CPU
          {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
          {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}.Release|Any CPU.Build.0 = Release|Any CPU
          {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}.Release|x86.ActiveCfg = Release|Any CPU
          {BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
          {BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
          {BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB}.Debug|x86.ActiveCfg = Debug|Any CPU
          {BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
          {BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB}.Release|Any CPU.Build.0 = Release|Any CPU
          {BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB}.Release|x86.ActiveCfg = Release|Any CPU
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Debug|x86.ActiveCfg = Debug|x86
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Debug|x86.Build.0 = Debug|x86
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Release|Any CPU.Build.0 = Release|Any CPU
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Release|x86.ActiveCfg = Release|x86
          {CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}.Release|x86.Build.0 = Release|x86
      EndGlobalSection
      GlobalSection(SolutionProperties) = preSolution
          HideSolutionNode = FALSE
      EndGlobalSection
  EndGlobal
  </code></pre>
  
  <p>And, here is the CSPROJ file content for project <code>C</code>:</p>
  
  <pre><code>  &lt;PropertyGroup&gt;
      &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt;
      &lt;Platform Condition=" '$(Platform)' == '' "&gt;AnyCPU&lt;/Platform&gt;
      ....
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "&gt;
      &lt;OutputPath&gt;bin\x86\Debug\&lt;/OutputPath&gt;
      &lt;PlatformTarget&gt;x86&lt;/PlatformTarget&gt;
      ....
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "&gt;
      &lt;OutputPath&gt;bin\x86\Release\&lt;/OutputPath&gt;
      &lt;PlatformTarget&gt;x86&lt;/PlatformTarget&gt;
      ....
    &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>I also tried this, but the problem remains same:</p>
  
  <pre><code>&lt;Platform Condition=" '$(Platform)' == '' "&gt;x86&lt;/Platform&gt;
  </code></pre>