I have this situation, I am using Yahoo Yui Compressor and my MSBuild file contains this line
<UsingTask TaskName="CompressorTask" AssemblyFile="..\Lib\Minification\Yahoo.Yui.Compressor.dll" />
This path that I have specified is relative to where the build script (in which this line exists) is.
I have these files in the Minification folder
EcmaScript.NET.modified.dll
New BSD License.txt
Yahoo.Yui.Compressor.dll
Yahoo.Yui.Compressor.MsBuildTask.dll
I can’t figure out if the following error on building is due to
- Wrong path being specified
- Missing dlls or other files
- Some other reason
The error is
C:\Builds\Mcfc\UI\Latest\MCFC\scripts\main.xml(270,5): error MSB4062:
The “CompressorTask” task could not be loaded from the assembly
C:\Builds\Mcfc\UI\Latest\MCFC\scripts..\Lib\Minification\Yahoo.Yui.Compressor.dll.
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. Done
Building Project “C:\Builds\Mcfc\UI\Latest\MCFC\scripts\main.xml”
(Deploy target(s)) — FAILED.
Any ideas?
Look closely at the path that is in the error message 🙂
You are missing a “\” between scripts and the ..
C:\Builds\Mcfc\UI\Latest\MCFC**scripts..**\Lib\Minification\