Integrating C# with Prolog - Getting a "System.BadImageFormatException" Exception though the target platform is set to x86

3

I've got a university project involves integrating Prolog with C# , So i downloaded the SwiPlCs DLL and linked it with my project.

I've got the following lines inside Main() method:

Environment.SetEnvironmentVariable("PATH", @"E:\\swipl\\bin");
string[] p = { "-q", "-f", @"test.pl" };
PlEngine.Initialize(p);

When i run the program , an exception occurs with the following message:

An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll

Additional information:  is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

I spent all the time reading related questions on Stack Overflow , people were suggesting to change the platform target to x86 , and that's what i exactly did , but nothing worked and i'm still getting the same exception.

Are there any solution(s) to this problem ?

c#
prolog

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0