我想在Mono的Jenkins构建服务器上构建一个C#项目。我使用Jenkins 2.60.2和MSBuild插件1.27。问题是我得到了这个失败的警告和错误消息:
Build started 08/11/2017 05:38:12.
Project "/jenkins-mono-slave/workspace/MyProject/MySolution.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "/jenkins-mono-slave/workspace/MyProject/MySolution.sln" (1) is building "/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj" (2) on node 1 (default targets).
/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2563,5): warning MSB3084: Task attempted to find "AxImp.exe" in two locations. 1) Under the "/usr/lib/mono/4.5/" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "/usr/lib/mono/4.5/" 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. [/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj]
/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2563,5): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPath "/usr/lib/mono/4.5/" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.7\WinSDK-NetFx40Tools-x86". 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 [/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj]
Done Building Project "/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj" (default targets) -- FAILED.
Done Building Project "/jenkins-mono-slave/workspace/MyProject/MySolution.sln" (default targets) -- FAILED.
Build FAILED.
"/jenkins-mono-slave/workspace/MyProject/MySolution.sln" (default target) (1) ->
"/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj" (default target) (2) ->
(ResolveComReferences target) ->
/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2563,5): warning MSB3084: Task attempted to find "AxImp.exe" in two locations. 1) Under the "/usr/lib/mono/4.5/" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "/usr/lib/mono/4.5/" 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. [/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj]
"/jenkins-mono-slave/workspace/MyProject/MySolution.sln" (default target) (1) ->
"/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj" (default target) (2) ->
(ResolveComReferences target) ->
/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2563,5): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPath "/usr/lib/mono/4.5/" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.7\WinSDK-NetFx40Tools-x86". 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 [/jenkins-mono-slave/workspace/MyProject/MySolution/MySolution.csproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.75
Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Finished: FAILURE
我找到的并不多,但是this question。建议在本地计算机上运行一次丢失的AxImp.exe,并将生成的dll提交到构建服务器。但是这个解决方案特定于Windows。我只有我的Linux环境(Jenkins +开发者机器)。有没有解决方案,有人知道如何解决这个问题吗?