I found quite a few Google hits on this issue, but couldn't find a solution.
When I try to convert a .NET-Interface to a Java stub using ikvmstub.exe
I get the following error:
C:\public\ikvm-0.44.0.5\bin\ikvmstub.exe NET_Interface.dll
Error: unable to load assembly 'NET_Interface.dll' as it depends on a higher ver
sion of mscorlib than the one currently loaded
NET_Interface.dll
depends on the framework version 4. This ve开发者_JAVA技巧rsion is installed on my machine.
How can I resolve this issue?
Thanks for your time.
There are two ways to solve this:
1) Create an ikvmstub.exe.config file that forces ikvmstub.exe to run on .NET 4.0
2) Explicitly specify the mscorlib version to use: \ikvm\bin\ikvmstub -nostdlib -r:\windows\microsoft.net\framework\v4.0.30319\mscorlib.dll NET_Interface.dll
Note that when you want to compile with ikvmc, you'll need to do the same (either one of both options).
精彩评论