Asp.net-Mvc-4

使用 MSBuild 12 建構 MVC 4.0 項目時“任務失敗,因為找不到 AXImp.exe”

  • January 27, 2014

我正在嘗試使用 CruiseControl.Net 和 MSBuild 設置建構伺服器。但是,它因錯誤而失敗:

"C:\Builds\PremiumStore\checkout\PremiumStore.sln" (default target) (1) ->
   "C:\Builds\PremiumStore\checkout\Web\PremiumStoreWeb.csproj" (default target) (37) ->
   (ResolveComReferences target) ->
   C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2151,5):     
   error MSB3091: Task failed because "AxImp.exe" was not found, or the correct Microsoft  
   Windows SDK is not installed.
The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-  NetFx40Tools-x86.`

You may be able to solve the problem by doing one of the following:    

1. Install the Microsoft Windows SDK.

2. Install Visual Studio

3. Manually set

   the above registry key to the correct location.  4) Pass the correct location into the 
   "ToolPath" parameter of the task. 
   [C:\Builds\PremiumStore\checkout\Web\PremiumStoreWeb.csproj]

同樣的東西在我自己的機器上建構得很好,只是在伺服器上不行。

我已經嘗試在整個 Internet 上搜尋解決方案,但找不到解決方案。如果可能的話,我寧願不必在建構伺服器上安裝 Visual Studio。安裝整個 IDE 只是為了進行命令行建構有點矯枉過正。我已經在該伺服器上安裝了 Microsoft Build Tools 2013,但它似乎沒有幫助。

我已嘗試按照錯誤消息的建議將路徑放入系統資料庫,但這也不起作用。我還檢查了系統資料庫中指示的路徑,並且 aximp.exe 確實存在,但在一個名為“NetFx 4.5.1 Tools”的子文件夾中。但是,將文件從此處複製到“bin”父文件夾似乎也無濟於事。

如果有幫助,我的建構伺服器可以在 Windows Server 2012 上執行。

提前致謝。

他們推薦的第 1 步(“安裝 Microsoft Windows SDK”)是正確的建議。安裝Microsoft Windows SDK

引用自:https://stackoverflow.com/questions/21373792