title: How do I force MSBuild to clean or rebuild?
body: <p>I am using MSBuild from a script to compile my project. I have noticed that it just does a build and not a clean/rebuild.</p>
  
  <p>I have the following:</p>
  
  <pre><code>&lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0"&gt;
  &lt;Target Name="Build"&gt;
      &lt;MSBuild Projects="$(MSBuildProjectDirectory)\myproj.csproj" Targets="Build" Properties="OutputPath=$(MSBuildProjectDirectory)\..\bin\" /&gt;
   &lt;/Target&gt;
  </code></pre>
  
  <p></p>
  
  <p>How do I force a clean/rebuild?</p>