任务找不到“aximpl .exe”

时间:2021-05-20 03:35:57

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:

我上传了一个。net 4 c#解决方案到appharbor,但是当appharbor试图构建它时,一个c#类库产生了这个错误:

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.

输入项目”D:\ temp \ cbymsn2u.j0c \ \ UI \盘\托盘。csproj”是构建“D:\ temp \ cbymsn2u.j0c \输入\企业\履带\爬虫。csproj”(GetNativeManifest目标(s)):c:\Windows\ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets(1558,9):警告MSB3084:任务试图找到“AxImp。在两个地点exe”。1)在“C:\程序文件\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\“处理器特定目录”(基于SdkToolsPath 2)下生成的x86特定目录下的“C:\程序文件\Microsoft SDKs\Windows\v7.0A\ \ \ \bin\ \bin\ binnetfx 4.0工具”),由SdkToolsPath属性指定。您可以通过以下方法解决这个问题:1)将“SDKToolsPath”属性设置为Microsoft Windows SDK的位置。c:\Windows\ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets(1558,9):找不到“AxImp错误MSB3086:任务。“使用SdkToolsPath”C:\程序文件\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\工具\”或注册表键“HKEY_LOCAL_MACHINE\软件\Microsoft SDKs\Windows\v7.0A”。确保在SdkToolsPath下设置了SdkToolsPath,该工具存在于正确的处理器特定位置,并安装了Microsoft Windows SDK,完成了构建项目“Tray”。csproj”——失败。

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 个解决方案

#1


11  

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.

看起来应该是安装工具,c:\Program Files\Microsoft sdk \ Windows \ v7.0A \ bin \ \ AxImp NETFX 4.0工具。exe是正常位置。您可以在自己的机器上验证这一点。我不知道AppHarbor到底做了什么,但是很有可能他们故意把这个工具拿走了。

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.

经营AxImp的希望很小。在远程构建服务器上的exe, ActiveX组件不会安装在该机器上。你需要运行AxImp。在你自己的工作站上,它只需要做一次。将它生成的两个程序集添加到项目interop.foo中。dll和axinterop.foo.dll。将复制本地属性设置为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.

如果你真的想在那台远程机器上运行你的应用程序,那么现在就停止,ActiveX控件不会安装在那台机器上。安装它应该需要一两个奇迹。

#1


11  

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.

看起来应该是安装工具,c:\Program Files\Microsoft sdk \ Windows \ v7.0A \ bin \ \ AxImp NETFX 4.0工具。exe是正常位置。您可以在自己的机器上验证这一点。我不知道AppHarbor到底做了什么,但是很有可能他们故意把这个工具拿走了。

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.

经营AxImp的希望很小。在远程构建服务器上的exe, ActiveX组件不会安装在该机器上。你需要运行AxImp。在你自己的工作站上,它只需要做一次。将它生成的两个程序集添加到项目interop.foo中。dll和axinterop.foo.dll。将复制本地属性设置为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.

如果你真的想在那台远程机器上运行你的应用程序,那么现在就停止,ActiveX控件不会安装在那台机器上。安装它应该需要一两个奇迹。