<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>

[{'answer_id': 71744, 'author': 'Ryan Lanciaux', 'author_id': 1385358, 'author_profile': 'https://Stackoverflow.com/users/1385358', 'pm_score': 1, 'selected': False, 'text': "<p>I don't know that this would do it for you but can you try building from the command line?</p>\n\n<p>msbuild ________</p>\n\n<p>I think that's how I built the application due to the same issues.</p>\n"}, {'answer_id': 80481, 'author': 'Epaga', 'author_id': 6583, 'author_profile': 'https://Stackoverflow.com/users/6583', 'pm_score': 1, 'selected': True, 'text': '<p>OK just got the following reply from the author: <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></p>\n<blockquote>\n<p>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.</p>\n<p>If you download ikvm-0.36.0.11.zip, classpath-0.95-stripped.zip and openjdk-b13-stripped.zip from SourceForge (the last two are under the ikvm 0.36.0.5 release) you have all the sources that are needed.</p>\n<p>Now you\'ll have to open a Visual Studio 2008 Command Prompt (i.e. one that has cl.exe and peverify in the path).</p>\n<p>Then in the ikvm root directory, do a &quot;nant clean&quot; followed by &quot;nant&quot;. 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).</p>\n<p>Regards,\nJeroen</p>\n</blockquote>\n<p><strong>Edit</strong>: After making sure the Platform SDK folders were in the Path and Lib environment variables, this worked for me. Thanks, Jeroen!</p>\n'}, {'answer_id': 43939164, 'author': 'Owen Pauling', 'author_id': 1688439, 'author_profile': 'https://Stackoverflow.com/users/1688439', 'pm_score': 0, 'selected': False, 'text': '<p>This is how I built IKVM 8.1.5717.0 from source. Visual Studio is not required.</p>\n\n<ul>\n<li><p>Create a folder:\nc:\\ikvm\\</p></li>\n<li><p>Add the above folder to PATH (e.g. set PATH=%PATH%;c:\\ikvm and leave command prompt open for later).</p></li>\n<li><p>Download:\nikvmsrc-8.1.5717.0.zip (<a href="http://www.frijters.net/ikvmsrc-8.1.5717.0.zip" rel="nofollow noreferrer">http://www.frijters.net/ikvmsrc-8.1.5717.0.zip</a>)</p></li>\n<li><p>Unzip and place "ikvm-8.1.5717.0" folder in c:\\ikvm\\</p></li>\n<li><p>Download:\nopenjdk-8u45-b14-stripped.zip (<a href="http://www.frijters.net/openjdk-8u45-b14-stripped.zip" rel="nofollow noreferrer">http://www.frijters.net/openjdk-8u45-b14-stripped.zip</a>)</p></li>\n<li><p>Unzip and place "openjdk-8u45-b14" folder in c:\\ikvm\\</p></li>\n<li><p>Download:\nJava 8 SDK (<a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" rel="nofollow noreferrer">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a>)</p></li>\n<li><p>Install and make sure location is added to path</p></li>\n<li><p>Download:\nNAnt 0.92 (<a href="https://sourceforge.net/projects/nant/files/nant/0.92/nant-0.92-bin.zip/download" rel="nofollow noreferrer">https://sourceforge.net/projects/nant/files/nant/0.92/nant-0.92-bin.zip/download</a>)</p></li>\n<li><p>Unzip and place "nant-0.92" folder in c:\\ikvm\\</p></li>\n<li><p>ICSharpCode.SharpZipLib.dll (<a href="http://www.icsharpcode.net/opensource/sharpziplib/Download.aspx" rel="nofollow noreferrer">http://www.icsharpcode.net/opensource/sharpziplib/Download.aspx</a>)</p></li>\n<li><p>Place "ICSharpCode.SharpZipLib.dll" in C:\\ikvm\\ikvm-8.1.5717.0\\bin\\</p></li>\n<li><p>Open the following file in a text editor and change the version number:\nC:\\ikvm\\ikvm-8.1.5717.0\\CommonAssemblyInfo.cs.in</p></li>\n<li><p>Using command prompt from earlier, cd to:\nC:\\ikvm\\ikvm-8.1.5717.0\\ikvm\\</p></li>\n<li><p>Run:\n..\\nant-0.92\\bin\\NAnt.exe</p></li>\n<li><p>If successful all the binaries will be in:\nC:\\ikvm\\ikvm-8.1.5717.0\\bin</p></li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/71599', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6583/']