Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Unable to succesfully execute the managed application with ANT development library

Rank

Total Posts: 1

Joined 2010-03-04

PM

Hi,

Recently I purchased an ANT development kit. I was able to execute the native applications (demo_dll.exeand demo_lib.exe) available with
the development library kit and was able to see the communication happening. While trying to execute the managed application (Ant_netdll_demo.exe) I am getting the below error

Error:An attempt was made to load a program with an incorrect format.(Exception from HRESULT:0x8007000B)
Could not connect to any devices, ensure an ANT device is connected to your system and try again.

I am also seeing the below error in VS debug window.

A first chance exception of type 'System.BadImageFormatException' occurred in ANT_NET.dll.

I doubt this is happening while importing ANT_WrappedLib.dll.
Please let me know what I am missing here.

Thanks,      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

This error typically means that the required version of the .NET framework is not available in the system. Make sure you have .NET 3.0 or higher installed. Do you see the error if you rebuild all the files? Make sure all the DLLs are in the working path of the executable as well.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hi,

I am able to fix this issue.This seems to be an issue with format.
When I changed the platform from "AnyCpu" to "X86" the issue was resolved.

Thanks,