title: Setting Visual Studio to automatically minifying using Ajax Minifier
body: <p>I use VS 2010 I would like at the pressing of <code>Build Button</code> have all CSS and .JS files minified.</p>
  
  <p>Following this <a href="http://stephenwalther.com/blog/archive/2009/10/16/using-the-new-microsoft-ajax-minifier.aspx" rel="nofollow">article</a> all is working great for JS... adding some extra code for the CSS (pasted below) I'm not able to Minifying the CSS. What I'm doing wrong here?</p>
  
  <p>Thanks for your time.</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;JS Include="**\*.css" Exclude="**\*.min.css;Scripts\*.css" /&gt;
  &lt;/ItemGroup&gt;
      &lt;AjaxMin SourceFiles="@(JS)" SourceExtensionPattern="\.js$" TargetExtension=".min.js" /&gt;
      &lt;AjaxMin SourceFiles="@(CSS)" SourceExtensionPattern="\.css$" TargetExtension=".min.css" /&gt;
  &lt;/Target&gt;
  </code></pre>