Why are AjaxMin and AjaxMinBundleTask commented out in AjaxMin.targets?

Sep 23, 2013 at 7:33 PM
I recently updated from v4.x to v5.x and I had an error saying that the "The AjaxMin task was not found...". I opened AjaxMin.targets and saw that the following were commented out:
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMin" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinBundleTask" />

I uncommented the two tasks and my project built successfully.

Is there a good reason? Should I stop using these tasks (in my case AjaxMin)?
Sep 23, 2013 at 7:49 PM
The bundle task is just for taking a number of source code files and bundling them up together into a single file; I'm not even sure if I've documented that one. The AjaxMin task is the legacy build task that was written a long time ago, and I don't really think it was particularly well thought out (to be brutally honest). The recommended way to use AjaxMin in your project now is to use the AjaxManifestTask (and the associated AjaxManifestCleanTask) and add a "manifest file" to your project -- that would be an XML file with the extension .ajaxmin, which describes explicitly what to build from where, to where, and with what settings. Doing so allows much more control over what gets built in your project and how, plus allows for incremental builds (won't spend time rebuilding outputs for which the inputs haven't been modified). You don't need to modify your CSPROJ file at all beyond including the <Import> element pointing to AjaxMin.targets; the rest is handled through any .ajaxmin files added to your project.

That said, I'll go ahead and uncomment the AjaxMin task element for future releases, since people like yourself who are still using the legacy build task don't want to be broken every time they update to the next release. It was probably dumb of me to comment it out in the first place.
Sep 23, 2013 at 7:54 PM
Alright, I wasn't aware of the new way (my bad). I'm going to read the doc and upgrade to the recommended way of using AjaxMin. Thanks for the quick response.
Sep 23, 2013 at 7:59 PM
To be fair, the documentation is far from clear on which method to use. I'll try to clear that up a bit.
Sep 30, 2013 at 10:09 PM
Okay, AjaxMin 5.2 forward will have those two lines uncommented so you shouldn't have to worry about an upgrade breaking your project.
Apr 25, 2014 at 8:24 AM
Hi Ronlo

Do you have a sample of howto use AjaxMinBundleTask ?
Or maybe I should check if a copy task can do the same bundling?

BR Raasor