2013-01-18 64 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「

我們還將縮小的文件添加到存儲庫,以便將它們複製到發佈區域。不是最優雅的解決方案,但它適用於我們的情況。

相關問題