Ok - I got a working solution. First of all, (this is a bit embarrassing I forgot to update my docs to make sure people use the correct dll.
Too Long; Didn't Read (TL;DR)
1. Grab the latest version of YUICompressor WITH MSBUILD TASK from NuGet. I've -replaced- v22.214.171.124 with a new v 126.96.36.199. So uninstall v188.8.131.52 and then re-install it via nuget.
2. Update your xml build file to point to the correct dll
AssemblyFile="<root folder for your solution>\packages\YUICompressor.NET-MsBuild-Task.184.108.40.206\lib\NET35\Yahoo.Yui.Compressor.MsBuildTask.dll" />
Before build 220.127.116.11, the main dll had the MSBuild task inside the dll. This ment that the dll actually had a dependency on some MSBuild namespaces and references. Under some certain code conditions (they had to do with deep
reflection upon the dll) the applications crashed if those MSBuild requirements were not installed on the computer. In summary, the dll sometimes cause systems to crash under very very very unique scenarios. I happen to be afflicted by that scenario
So, I split the dll into two dll's.
Now, if you need to do something with MSBuild, then you need to get the NuGet package with MSBuild in it :
Now this new package used to contain a dependancy upon the core dll, but i just couldn't get my msbuild.xml file to work when the yuicompressor-core dll's are NOT in the same folder as the yuicompress-msbuild.dll. I thought there was a assembly reference
element or something, but I could figure it out.
So the crappy solution I've done is to put the yuicompressor-core dll's AND the new yuicompressor-msbuild dll into the same nuget pacakge. *sigh*
So .. that's the first thing.
Next, change your msbuild xml file to point to the yuicompressor-msbuild file, not the core file.
It should now read like this..
AssemblyFile="<root folder for your solution>\packages\YUICompressor.NET-MsBuild-Task.18.104.22.168\lib\NET35\Yahoo.Yui.Compressor.MsBuildTask.dll"
Of course, you need to put the correct path/location of the dll.
Tell me how this goes for you all.