title: Use ProjectName when building an entire solution with MSBuild
body: <p>Rather than building to the default folder structure, which is like</p>
  <pre><code>Solution.sln
  Project1
      bin    &lt;- project 1 output
      obj    &lt;- project 1 intermediate output
  Project2
      bin    &lt;- project 2 output
      obj    &lt;- project 2 intermediate output
  </code></pre>
  <p>I instead want to build it like</p>
  <pre><code>Solution.sln
  bin    &lt;- project 1 AND 2 output
  obj
      Project1   &lt;- project 1 intermediate output
      Project2   &lt;- project 2 intermediate output
  </code></pre>
  <p>I can do</p>
  <pre><code>msbuild &quot;/p:OutputPath=../bin&quot; &quot;/p:IntermediateOutputPath=../obj/&quot; Test123.sln
  </code></pre>
  <p>However, using <code>&quot;/p:IntermediateOutputPath=../obj/$(ProjectName)/&quot;</code> does not work. Instead of creating a folder for each project, it creates one folder literally called <code>$(ProjectName)</code> (I've read that most, but not all of these macros are actually a Visual Studio thing, rather than MSBuild magic).</p>
  <p>How can I use a project-specific value (such as <code>ProjectName</code>) in a property value (such as <code>IntermediateOutputPath</code>) when building?</p>
  <p>(Some background information:</p>
  <p>Having one <code>bin</code> folder on the solution level saves unnecessary copying of output files, which quickly amass over 100 MB in large solutions. Furthermore, it keeps the source folders clean so they can be read-only.</p>
  <p>I still want separate <code>obj</code> folders though, because who knows what goes in there - might be the same file names for different projects.)</p>