Visual Studio Publish Minified Files Every Time, How to Stop it?

434 Views Asked by At

We use Microsoft Ajax (ajaxmin.tasks) approach which described in this one (http://stackoverflow.com/questions/5043504/using-microsoft-ajax-minifier-with-visual-studio-2010-1-click-publish) to minify the css/js file when each build, it works great.

But the minified file changes every time when rebuild, even the original file has never changed. This cause the publish process (or by FTP) transfer all minified css/js files each time.

My question is: how to stop Visual Studio publishing the same file (maybe timestamp is different)? Or how to stop Microsoft Ajax Minifier minify a file has already been minified?

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

The AjaxMin build task should be looking at file times and not minifying if the output is newer than the input. I'll enter a change request in the AjaxMin website, http://ajaxmin.codeplex.com.