title: How to get IKVM to build in Visual Studio 2008?
body: <p>I've downloaded the IKVM sources (<a href="http://www.ikvm.net/" rel="nofollow noreferrer">http://www.ikvm.net/</a>) from <a href="http://sourceforge.net/cvs/?group_id=69637" rel="nofollow noreferrer">http://sourceforge.net/cvs/?group_id=69637</a></p>
  
  <p>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?</p>
  
  <p>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.</p>
  
  <p>As you can probably guess I'm no Visual Studio expert, but rather am used to working with Java in Eclipse.</p>
  
  <p>So again, I'm looking for either: step-by-step instructions or a link to documentation on how to build IKVM in Visual Studio.</p>
  
  <p>Let me know if you need any more info. Thanks for any help!</p>
  
  <p><strong>Edit:</strong> I've also tried a manual "MsBuild.exe IKVM8.sln", but also get a bunch of:</p>
  
  <pre><code>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?)
  </code></pre>
  
  <p><strong>Edit #2</strong>: I noticed a "ikvm.build" 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:</p>
  
  <p>ikvm-native-win32:</p>
  
  <pre><code>            [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'.
          BUILD FAILED
          C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\native.build(17,10):
          'cl' failed to start.
             The system cannot find the file specified
          Total time: 0.2 seconds.
  </code></pre>
  
  <p><strong>Edit #3</strong>: OK solved that by putting <code>cl.exe</code> in the path, still getting other errors though. <strong><em>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...</em></strong></p>
  
  <p><strong>Edit #4</strong>: Next step was installing GNU classpath 0.95, and now it looks like I need a specific OpenJDK installation... Linux AMD64?!</p>
  
  <pre><code>             [exec] javac: file not found: ..\..\openjdk6-b12\control\build\linux-amd64\gensrc\com\sun\accessibility\internal\resources\accessibility.java
               [exec] Usage: javac &lt;options&gt; &lt;source files&gt;
               [exec] use -help for a list of possible options
  </code></pre>
  
  <p><strong>Edit #5</strong>: Got an answer from the author. See below or at <a href="http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf" rel="nofollow noreferrer">http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf</a>  Let's see if it works...</p>
  
  <p><strong>Edit #6</strong> As I feared, next problem: "cannot open windows.h", see separate question <a href="https://stackoverflow.com/questions/80788/fatal-error-c1083-cannot-open-include-file-windowsh-no-such-file-or-directory">here</a>.</p>
  
  <p><strong>Final Edit: Found Solution!</strong> After getting the Platform SDK folders in the Lib and Path environment variables, the solution I described below worked for me.</p>