How to use Visual Studio's Post-build Event with YUI Compressor for .NET
** This documentation is out of date and being updated - please download the latest source code and look at the Example web project there **
Personally, I would recommend this for RELEASE configurations but you can do this under any configuration type (eg. DEBUG, RELEASE and custom types).
Note: You can modify the steps below to add other custom actions, like removing the msbuild folder after build, etc. This is not explained in this wiki page ... and is left for you to research :P
Step 1 - Create an MSBuild xml file which creates all the settings.
Here is an example xml file with sample settings.
Step 2 - Make a folder where we will place all the MSBuild stuff. Place the xml file and the 2 dependant dll's in the same folder.
Step 3 - Modify the web project Build settings. Please take note of
- $(TargetDir) <-- you might wish to change this if you have another destination directory.
Step 4 - Build away :)