title: MSBuild Using Take Fails to load assembly
body: <p>I am attempting to use MSBuild and the YUICompressor for .NET to compress my js and css files upon build.</p>
  
  <p>I am following the documentation found <a href="http://yuicompressor.codeplex.com/wikipage?title=Visual%20Studio%20Post-build%20Event%20example&amp;ProjectName=yuicompressor" rel="nofollow">here</a> and <a href="http://blackriverweb.com/2011/09/compressing-css-with-yui-compressor-for-net/" rel="nofollow">here</a></p>
  
  <p>When I try to build, I am getting the following error:</p>
  
  <pre><code>Error   4   The "CompressorTask" task could not be loaded from the assembly C:\Apps\MyApp\packages\YUICompressor.NET.1.7.0.0\lib\net35\Yahoo.Yui.Compressor.dll.
  </code></pre>
  
  <p>Confirm that the  declaration is correct, that the assembly and all its 
  dependencies are available, and that the task contains a public class that implements
   Microsoft.Build.Framework.ITask.   </p>
  
  <p>My post build command is as such:</p>
  
  <pre><code>$(MSBuildBinPath)\msbuild.exe /p:Configuration=$(ConfigurationName) "$(ProjectDir)MSBuild\MSBuildSettings.xml"
  </code></pre>
  
  <p>Any ideas on why this may be occuring? The assemblies seem to be in the correct directories.</p>