I started by installing the YUICompressor .NET (MsBuild Task) package from Nuget gallary in my VS2010 web project.
Download the Sample WebSite using Post-Build events. Copy the MSBuild folder to your project root.
Open MSBuildSettings.xml (inside the MSBuild folder in your project) and modify the element UsingTask‘s attribute AssemblyFile to AssemblyFile="(root folder for your solution)\packages\YUICompressor.NET-MsBuild-Task.188.8.131.52\lib\NET35\Yahoo.Yui.Compressor.MsBuildTask.dll". Also modify the path and the final file name for CSS and JS output. Click the image below to see the code.
Finally, modify the web project Build settings. Please take note of
$(TargetDir) <– you might wish to change this if you have another destination directory.
You can copy the post-build event script from below,
Good luck trying.
YUI Compressor project on github
Yahoo! UI Library: YUI Compressor for .Net
Article helped me troubleshoot YUICompression
I really like what you guys are usually up too. This sort of
clever work and exposure! Keep up the good works guys I’ve incorporated you guys to my own blogroll.
Pretty! This has been an incredibly wonderful post.
Thank you for supplying this info.
I like the helpful information you provide in your articles.
I’ll bookmark your weblog and check again here frequently. I’m quite certain I’ll learn a lot of new stuff right here! Best of luck for the next!
Hello! I could have sworn I’ve been to this blog before but after looking at a few of the articles I realized it’s new to me.
Anyways, I’m definitely pleased I came across it and I’ll be
book-marking it and checking back often!
Thanks for finally writing about >Increase your website performance by
This design is incredible! You obviously know how to keep a
reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job.
I really loved what you had to say, and more than that, how you presented it.