Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
281 views
in Technique[技术] by (71.8m points)

c# - Task could not find "AxImp.exe"

I uploaded a .NET 4 C# solution to appharbor, however when appharbor tries to build it, one of the c# class libraries generates this error:

Project "D:empcbymsn2u.j0cinputUITrayTray.csproj" is building "D:empcbymsn2u.j0cinputBusinessCrawlerCrawler.csproj" (GetNativeManifest target(s)): c:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(1558,9): warning MSB3084: Task attempted to find "AxImp.exe" in two locations. 1) Under the "C:Program FilesMicrosoft SDKsWindowsv7.0AinNETFX 4.0 Tools" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "C:Program FilesMicrosoft SDKsWindowsv7.0AinNETFX 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:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(1558,9): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPath "C:Program FilesMicrosoft SDKsWindowsv7.0AinNETFX 4.0 Tools" or the registry key "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.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.

There don't seem to be any different references in Crawler.csproj so where would this error come from? The same code builds fine locally.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It looked where the tool is supposed to be installed, c:Program FilesMicrosoft SDKsWindowsv7.0AinNETFX 4.0 ToolsAxImp.exe is the normal location. You can verify this on your own machine. I don't know exactly what AppHarbor does but the odds are good that they intentionally removed that tool.

There's is very little hope of running AxImp.exe on a remote build server, the ActiveX component isn't going to be installed on that machine. You'll need to run AxImp.exe on your own workstation, it only has to be done once. Add the two assemblies it generates to your project, interop.foo.dll and axinterop.foo.dll. Set their Copy Local property to true.

If you actually intend to run your app on that remote machine then stop right now, the ActiveX control isn't going to be installed on that machine. Getting it installed ought to take a miracle or two.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...