kaiser kaiser - 1 year ago 113
C# Question

Specify the .Net Framework with IKVM

I compiled a Java application to a C# dll with IKVM. I tried to use this dll in a C# project which uses .Net Framework 2.0 but failed since the converted dlls framework obviously is higher. I looked through the arguments of the IKVM compiler but didn't find anything regarding the framework.

My question now is:

Am I able to specify the framework version of the compiled DLL/EXE with IKVM? If so, how?

Thanks in advance.

Answer Source

The current version of IKVM 7.1 is build with the framework 2.0. If you create a dll with IKVMC then it use by default the framework 2.0. Another thing is if you build IKVM self.

If you want compile a dll for a higher framework as 2.0 then you need to use the command line parameter:


And you need to set the all needed references (like mscorlib.dll) to the target framework with the command line parameter:

-r:<file name>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download