Wednesday, 15 April 2015

asp.net - Yahoo.Yui.Compressor.Build.MsBuild.dll. Could not load file or assembly 'Yahoo.Yui.Compressor -



asp.net - Yahoo.Yui.Compressor.Build.MsBuild.dll. Could not load file or assembly 'Yahoo.Yui.Compressor -

i using yahoo.yui.compressor.build.msbuild compress css , javascript files. have installed yahoo.yui.compressor.build.msbuild 2.2 , format of xml file

<?xml version="1.0" encoding="utf-8" ?> <project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <usingtask taskname="compressortask" assemblyfile="..\..\lib\yui\yahoo.yui.compressor.build.msbuild.dll" /> <propertygroup> <javascriptoutputfile condition=" '$(javascriptoutputfile)'=='' ">..\scripts-min\myfile.min.js</javascriptoutputfile> </propertygroup> <target name="mytasktarget"> <itemgroup> <javascriptfiles include="$(sourcelocation)..\scripts\myfile.js"/> </itemgroup> <compressortask cssfiles="@(cssfiles)" deletecssfiles="false" cssoutputfile="$(cssoutputfile)" csscompressiontype="yuistockcompression" javascriptfiles="@(javascriptfiles)" obfuscatejavascript="true" preserveallsemicolons="false" disableoptimizations="nope" encodingtype="default" deletejavascriptfiles="false" linebreakposition="-1" javascriptoutputfile="$(javascriptoutputfile)" loggingtype="alittlebit" threadculture="en-au" /> </target> </project>

when build code it's shows below error

error 18 "compressortask" task not loaded assembly d:\projects\yui\..\..\lib\yui\yahoo.yui.compressor.build.msbuild.dll. not load file or assembly 'yahoo.yui.compressor, version=2.2.0.0, culture=neutral, publickeytoken=null'or 1 of dependencies. scheme cannot find file specified. confirm <usingtask> declaration correct, assembly , dependencies available, , task contains public class implements microsoft.build.framework.itask.

i ran same issue...

it appears yahoo.yui.compressor.dll needs in same directory yahoo.yui.compressor.build.msbuild.dll. same true other dependencies, such ecmascript.net.dll , iesi.collections.dll.

you can either move things \lib\yui\ directory sit down alongside each other, or can reference assemblies in bin folder.

if decide reference assemblies in bin folder, may have utilize post-build event trigger compression, opposed pre-build event.

asp.net asp.net-mvc yui-compressor

No comments:

Post a Comment