title: Proper use of NET 5 csproj properties Platform and Platforms
body: <p>This question is about NET 5 csproj file properties <code>&lt;Platform&gt;, &lt;Platforms&gt;, and &lt;PlatformTarget&gt;</code>.</p>
  <p>The &quot;msbuild clean&quot; target references different project folders dependending on the content of the csproj XML properties.</p>
  <p>Msbuild clean using <code>&lt;Platform&gt;x64&lt;/Platform&gt;</code> (singular Platform) correctly deletes files from</p>
  <pre><code>Deleting file &quot;C:\dev\myproject\bin\x64\Debug\net5.0-windows7.0\myproject.exe&quot;.
  </code></pre>
  <p>Msbuild clean using <code>&lt;Platforms&gt;x64&lt;/Platforms&gt;</code> (plural Platform) wrongly? deletes files from</p>
  <pre><code>Deleting file &quot;C:\dev\myproject\bin\Debug\net5.0-windows7.0\myproject.exe&quot;.
  </code></pre>
  <p>Msbuild clean using <code>&lt;Platform&gt;x64;AnyCPU&lt;/Platform&gt;</code> (singular Platform) correctly deletes files from</p>
  <pre><code>Deleting file &quot;C:\dev\myproject\bin\Debug\net5.0-windows7.0\myproject.exe&quot;
  but fails to delete files from the x64 output folder like so:
  Deleting file &quot;C:\dev\myproject\bin\x64\Debug\net5.0-windows7.0\myproject.exe&quot;.
    
  </code></pre>
  <p>Msbuild clean using <code>&lt;Platforms&gt;x64;AnyCPU&lt;/Platforms&gt;</code> (plural Platform) correctly deletes files from</p>
  <pre><code>Deleting file &quot;C:\dev\myproject\bin\Debug\net5.0-windows7.0\myproject.exe&quot;
  but fails to delete files from the x64 output folder like so:
  Deleting file &quot;C:\dev\myproject\bin\x64\Debug\net5.0-windows7.0\myproject.exe&quot;.
  </code></pre>
  <p>Is this correct behavior? I expected the clean target to delete files from the output folders associated with each platform in the <code>&lt;Platform&gt;</code> property.</p>
  <p>Why does plural version of Platforms always default to AnyCPU behavior for the 'clean' target regardless of the property value? Platform can be used for a single platform, but Platforms is required for multiple platforms. My experiments above show that only singular Platform has the expected (intuitive) behavior.</p>
  <p>Am I missing something obvious or am I expecting the wrong behavior? What are the precise rules for when I should use Platform and Platforms?</p>
  <p>(I have even seen PlatformTarget in some online project files/examples, but maybe PlatformTarget is a custom property and not an MSBuild-defined property?)</p>