c# visual-studio-2008 compiler-errors ikvm
Updated Thu, 29 Dec 2022 13:00:22 GMT

How to get IKVM to build in Visual Studio 2008?

I've downloaded the IKVM sources ( from

Now I'm trying to get it to build in Visual Studio 2008 and am stuck. Does anyone know of documentation of how to build the thing, or could even give me pointers?

I've tried opening the ikvm8.sln, which opens all the projects, but trying to build the solution leads to a bunch of "type or namespace could not be found" errors.

As you can probably guess I'm no Visual Studio expert, but rather am used to working with Java in Eclipse.

So again, I'm looking for either: step-by-step instructions or a link to documentation on how to build IKVM in Visual Studio.

Let me know if you need any more info. Thanks for any help!

Edit: I've also tried a manual "MsBuild.exe IKVM8.sln", but also get a bunch of:

JniInterface.cs(30,12): error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'IKVM' (a
re you missing an assembly reference?)
JniInterface.cs(175,38): error CS0246: The type or namespace name 'ClassLoaderWrapper' could not be found (are you mi
ssing a using directive or an assembly reference?)
JniInterface.cs(175,13): error CS0246: The type or namespace name 'ClassLoaderWrapper' could not be found (are you mi
ssing a using directive or an assembly reference?)

Edit #2: I noticed a "" file so I downloaded and ran nant on the folder, which got me a step further. A few things start to build successfully, unfortunately I now get the following error:


            [mkdir] Creating directory 'C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\Release'.
               [cl] Compiling 2 files to 'C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\Release'.
        C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\,10):
        'cl' failed to start.
           The system cannot find the file specified
        Total time: 0.2 seconds.

Edit #3: OK solved that by putting cl.exe in the path, still getting other errors though. Note this is all for building it on the console e.g. with Nant. Is there no way to get it to build in Visual Studio? That would be sad...

Edit #4: Next step was installing GNU classpath 0.95, and now it looks like I need a specific OpenJDK installation... Linux AMD64?!

             [exec] javac: file not found: ..\..\openjdk6-b12\control\build\linux-amd64\gensrc\com\sun\accessibility\internal\resources\
             [exec] Usage: javac <options> <source files>
             [exec] use -help for a list of possible options

Edit #5: Got an answer from the author. See below or at Let's see if it works...

Edit #6 As I feared, next problem: "cannot open windows.h", see separate question here.

Final Edit: Found Solution! After getting the Platform SDK folders in the Lib and Path environment variables, the solution I described below worked for me.


OK just got the following reply from the author:

If you want to build from cvs, you're on your own. However, you can more easily build from source if you use an official release.

If you download, and from SourceForge (the last two are under the ikvm release) you have all the sources that are needed.

Now you'll have to open a Visual Studio 2008 Command Prompt (i.e. one that has cl.exe and peverify in the path).

Then in the ikvm root directory, do a "nant clean" followed by "nant". That should build the whole project. After you done that, you should be able to build in Visual Studio (debug target only), but you may need to repair the assembly references in the projects (unless you have ikvm installed in c:\ikvm).

Regards, Jeroen

Edit: After making sure the Platform SDK folders were in the Path and Lib environment variables, this worked for me. Thanks, Jeroen!