2011-05-07 166 views
8

我上傳了.NET 4的C#解決appharbor,但是當appharbor嘗試構建它,在C#類圖書館之一生成此錯誤:任務找不到「AxImp.exe」

Project "D:\temp\cbymsn2u.j0c\input\UI\Tray\Tray.csproj" is building "D:\temp\cbymsn2u.j0c\input\Business\Crawler\Crawler.csproj" (GetNativeManifest target(s)): c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): warning MSB3084: Task attempted to find "AxImp.exe" in two locations. 1) Under the "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" which is specified by the SDKToolsPath property. You may be able to solve the problem by doing one of the following: 1) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPath "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed Done building project "Tray.csproj" -- FAILED.

有別在Crawler.csproj中似乎沒有任何不同的引用,所以這個錯誤從哪裏來?相同的代碼可以在本地生成。

+0

你是否設法解決這個問題,Justin?我遇到了同樣的問題。 – 2011-10-13 10:44:34

回答

11

它看起來應該安裝該工具的位置,c:\ Program Files \ Microsoft SDKs \ Windows \ v7.0A \ bin \ NETFX 4.0 Tools \ AxImp.exe是正常的位置。你可以在你自己的機器上驗證這一點。我不確切知道AppHarbor做了什麼,但他們故意刪除該工具的可能性很大。

在遠程構建服務器上運行AxImp.exe幾乎沒有希望,ActiveX組件將不會安裝在該計算機上。你需要在你自己的工作站上運行AxImp.exe,它只需要做一次。將它生成的兩個程序集添加到項目中,interop.foo.dll和axinterop.foo.dll。將其「複製本地」屬性設置爲true。

如果您實際上打算運行您的應用程序在該遠程計算機上,然後立即停止,ActiveX控件將不會安裝在該計算機上。安裝它應該需要一兩個奇蹟。

+0

感謝您的回覆,我會嘗試生成/添加這2個程序集。然而,我很困惑,因爲我不認爲我有任何Activex組件,失敗的項目是一個WPF應用程序(Tray.csproj),它試圖編譯一個類庫(Crawler.csproj。) – Justin 2011-05-08 14:30:15

+0

我不能從這裏看你的項目。錯誤消息當然表明你這樣做。 – 2011-05-08 14:37:19