title: How to use the -clobber option while using the Ajax Minifier in MSBuild process in Visual Studio 2010
body: <p>Basically, my end goal is to remove already present .min.js and CSS files when building my Visual Studio solution while I have <a href="http://ajaxmin.codeplex.com/" rel="nofollow">Ajax Minifier</a> (version 4.20) as one of <a href="http://en.wikipedia.org/wiki/MSBuild" rel="nofollow">MSBuild</a> task which minifies .js and .css files.</p>
  
  <p>According to Ajax Minifier documentation, I could use the <code>-clobber</code> option to achieve the above mentioned goal. However, I'm not able to figure out where in Visual Studio MSBuild project task I can use this option. I'm successfully able to use the <code>-clobber</code> option from Ajax Minifier command-line tool though.</p>
  
  <p>Here is the configuration code which I have in my project (.csproj) file...</p>
  
  <pre><code>&lt;Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\ajaxmin.tasks" /&gt;
  &lt;Target Name="AfterBuild"&gt;
      &lt;ItemGroup&gt;
          &lt;JS Include="**\*.js" Exclude="**\*.min.js;Scripts\*.js" /&gt;
      &lt;/ItemGroup&gt;
      &lt;ItemGroup&gt;
          &lt;CSS Include="**\*.css" Exclude="**\*.min.css" /&gt;
      &lt;/ItemGroup&gt;
      &lt;AjaxMin JsSourceFiles="@(JS)" JsSourceExtensionPattern="\.js$" JsTargetExtension=".min.js" CssSourceFiles="@(CSS)" CssSourceExtensionPattern="\.css$" CssTargetExtension=".min.css" clobber="true" /&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>However, when I compiled my solution, I got following error - not sure why?</p>
  
  <blockquote>
    <p>The "clobber" parameter is not supported by the "AjaxMin" task. Verify the parameter exists on the task, and it is a settable public instance property.</p>
  </blockquote>