title: Unable to run Ajax Minifier as post-build in Visual Studio
body: <p>I've set up my post build config as demonstrated at <a href="http://www.asp.net/ajaxlibrary/ajaxminquickstart.ashx" rel="nofollow">http://www.asp.net/ajaxlibrary/ajaxminquickstart.ashx</a></p>
  
  <p>I'm getting the following error though:</p>
  
  <p><strong>The "JsSourceFiles" parameter is not supported by the "AjaxMin" task. 
  Verify the parameter exists on the task, and it is a settable public instance property.</strong></p>
  
  <p>My configuration settings......</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" /&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"  /&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>I had a look at the AjaxMinTask.dll with reflector and noted that the publicly exposed properties do not match the ones in my config. There is an array of <code>ITaskItem</code> called <code>SourceFiles</code> though so I edited my configuration to match.</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" /&gt;
      &lt;/ItemGroup&gt;
      &lt;ItemGroup&gt;
        &lt;CSS Include="**\*.css" Exclude="**\*.min.css" /&gt;
      &lt;/ItemGroup&gt;
      &lt;AjaxMin
          SourceFiles="@(JS);@(CSS)"  SourceExtensionPattern="\.js$;\.css$" TargetExtension=".min.js;.min.css"/&gt;
    &lt;/Target&gt;
  </code></pre>
  
  <p>I now get the error:</p>
  
  <p><strong>The "SourceFiles" parameter is not supported by the "AjaxMin" task. 
  Verify the parameter exists on the task, and it is a settable public instance property.</strong></p>
  
  <p>I'm scratching my head now. Surely it should be easier than this?</p>
  
  <p>I'm running Visual Studio 2010 Ultimate on a Windows 7 64 bit installation.</p>