I have create a C# dll project that has dependencies (dlls). I am compiling the C# dll successfully and using jni4net to generate dlls and jar file that I need use in java. The jar files and dlls are genereted successfully but when I run the java code I am getting this error. "Mixed mode assembly is built against version v2.0.50727 of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information." My question is how can I include the App.config file in the proxygen.exe to resolve this error. My app.config file in C# project is
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
I need the generated dlls from proxygen.exe to read the config file. Here is my java code
Bridge.setVerbose(false);
Bridge.setDebug(true);
Bridge.init();
Bridge.LoadAndRegisterAssemblyFrom(new File(""));//path to the generated dll from proxygen.exe
CsharpClass op=new CsharpClass();