8
votes

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:\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.

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.

1
Did you manage to resolve this, Justin? I'm getting the same problem.Andre Luus

1 Answers

12
votes

It looked where the tool is supposed to be installed, c:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\AxImp.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.