How to compress CSS/JS in VS2010 Web Deployment Build Template?

Posted by RPM1984 on Stack Overflow See other posts from Stack Overflow or by RPM1984
Published on 2010-05-27T01:18:01Z Indexed on 2010/06/09 1:42 UTC
Read the original article Hit count: 645

Hi all,

We've recently upgraded from VS2008 -> VS2010 (and hence upgrading from Web Deployment Project to proper deployment project).

Obviously what's new in VS2010 web deployments is the introduction of Workflow as the build process template.

Previously, we used a MSBuild task in the WDP to execute the Yahoo YUI Javascript/CSS compression module to minify/compress javascript and css files.

Has anyone managed to accomplish this task with Visual Studio 2010?

I have seen the new "SquishIt" compressor created by Justin Etheridge, but its not ideal as it "squishes" on the fly (e.g on Application_Start - Global.ascx) - which means you still have to push out all the uncompressed files to your web server before squishing.

In the Workflow designer - i can see a toolbox item called "MSBuild" - just dont know how to use it to accomplish what i want.

Been searching high and wide, no-one seems to know how.

Surely someone out there has done this.

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about Workflow