2013-01-18 28 views
1

我试图在不安装的情况下使用AjaxMin。从这个链接(http://ajaxmin.codeplex.com/wikipage?title=AjaxMinTask)我认为UsingTask标签会让我去做,但我不断收到此错误:在不安装的情况下使用AjaxMin

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.

我也试过这个(Could not load file or assembly App_Licenses),但它仍然无法正常工作。有任何想法吗?

+0

嘿@mike。从阅读相同的维基链接看来,您的项目中必须具有'AjaxMinTask.dll'才能够使用'UsingTask'。你有没有为你的项目添加对'AjaxMinTask.dll'的引用? –

+0

我将AjaxMinTask.dll签入我的存储库,并且我的项目.csproj文件包含引用该位置的标记。我没有,但是将该dll添加到我的项目的参考。我不认为这是必要的...? – mike

+0

鉴于错误消息,我建议在项目中添加对“AjaxMinTask.dll”的引用。 –

回答

2

fyi - 将dll作为参考添加不起作用。我们最终添加了AjaxMin dll并将其存储到存储库中,创建了manifest.xml,然后将以下内容作为预构建步骤添加:

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

我们还将缩小的文件添加到存储库,以便将它们复制到发布区域。不是最优雅的解决方案,但它适用于我们的情况。

相关问题