문제

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 version 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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top