Using AjaxMin without installing

假装没事ソ 提交于 2019-12-11 11:01:24

问题


I'm trying to use AjaxMin without installing it. From this link ( http://ajaxmin.codeplex.com/wikipage?title=AjaxMinTask ) I thought the UsingTask tag would let me do it, but I keep getting this error:

E:......csproj (487): The "AjaxMin" task could not be instantiated from "E:...\libraries\AjaxMinTask.dll". System.IO.FileNotFoundException: Could not load file or assembly 'AjaxMin, Version=4.79.4762.18504, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The system cannot find the file specified. File name: 'AjaxMin, Version=4.79.4762.18504, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' at Microsoft.Ajax.Minifier.Tasks.AjaxMin..ctor() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. E:......Web.csproj (487): The "AjaxMin" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.

I also tried this ( Could not load file or assembly App_Licenses ), but it still doesn't work. Any ideas?


回答1:


fyi - adding the dll as a reference did not work. we ended up adding the AjaxMin dll and exes to the repository, creating a manifest.xml, then adding the following as a pre-build step:

"$(SolutionDir)\libraries\AjaxMin" -clobber -xml "$(ProjectDir)\AjaxMin\manifest.xml"

we also added the minified files to the repository so they are copied to the publish area. not the most elegant solution, but it works for our situation.



来源:https://stackoverflow.com/questions/14405508/using-ajaxmin-without-installing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!