Getting error while building solution.. "Task failed because "AxImp.exe" was not found,"

Ask general questions here.
ajaypappan
Posts: 3
Joined: Thu May 02, 2019 3:45 am

Getting error while building solution.. "Task failed because "AxImp.exe" was not found,"

Post by ajaypappan » Wed May 22, 2019 4:30 pm

Added below lines to the code and i am getting this error..also added microsoft excel object lib to the reference too..

using Microsoft.Office.Interop.Excel

Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlBook = xlApp.Workbooks.Open(xlPath);
Excel.Worksheet xlSheet = (Excel.Worksheet)xlBook.Worksheets["Sheet1"];


Error message-
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.0A\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 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task. (MSB3091)

User avatar
RobinHood42
Posts: 324
Joined: Fri Jan 09, 2015 3:24 pm

Re: Getting error while building solution.. "Task failed because "AxImp.exe" was not found,"

Post by RobinHood42 » Thu May 23, 2019 1:49 pm

Hey,

This message comes from the .NET Framework. Did you try one of the suggestions in the error message?

1) Install the Microsoft Windows SDK.
2) Install Visual Studio 2010.
3) Manually set the above registry key to the correct location.
4) Pass the correct location into the "ToolPath" parameter of the task.

This helped other users already.
https://www.ranorex.com/forum/task-fail ... tml#p51871
https://www.ranorex.com/forum/task-fail ... tml#p51940

Cheers,
Robin :mrgreen: