| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Building the C# API</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" /> |
| 10 | <link rel="up" href="build_win.html" title="Chapter 5. Building Berkeley DB for Windows" /> |
| 11 | <link rel="prev" href="build_win_java.html" title="Building the Java API" /> |
| 12 | <link rel="next" href="build_win_sql.html" title="Building the SQL API" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Building the C# API</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="build_win_java.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 5. |
| 26 | Building Berkeley DB for Windows |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="build_win_sql.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="build_win_csharp"></a>Building the C# API</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p> |
| 42 | The C# support is built by a separate Visual Studio solution and |
| 43 | requires version 2.0 (or higher) of the .NET platform. If the Berkeley |
| 44 | DB utilities are required, build Berkeley DB first following the |
| 45 | instructions under <a class="xref" href="build_win.html#win_build32" title="Building Berkeley DB for 32 bit Windows">Building Berkeley DB for 32 bit Windows</a> |
| 46 | or <a class="xref" href="win_build64.html" title="Building Berkeley DB for 64-bit Windows">Building Berkeley DB for 64-bit Windows</a>. |
| 47 | </p> |
| 48 | <p> |
| 49 | To build the C# API in Visual Studio |
| 50 | 2005/Visual Studio 2008, the solution is |
| 51 | <code class="filename">build_windows\BDB_dotnet.sln</code>; in Visual Studio |
| 52 | 2010, the solution is |
| 53 | <code class="filename">build_windows\BDB_dotnet_vs2010.sln</code>. |
| 54 | </p> |
| 55 | <p> |
| 56 | By default, the solution will build the native libraries, the |
| 57 | managed assembly and all example programs. The NUnit tests need to |
| 58 | be built explicitly because of their dependence upon the NUnit |
| 59 | assembly. The native libraries will be placed in one of the |
| 60 | following subdirectories, depending upon the chosen configuration: |
| 61 | </p> |
| 62 | <table class="simplelist" border="0" summary="Simple list"> |
| 63 | <tr> |
| 64 | <td> |
| 65 | <code class="filename">build_windows\Win32\Debug</code> |
| 66 | </td> |
| 67 | </tr> |
| 68 | <tr> |
| 69 | <td> |
| 70 | <code class="filename">build_windows\Win32\Release</code> |
| 71 | </td> |
| 72 | </tr> |
| 73 | <tr> |
| 74 | <td> |
| 75 | <code class="filename">build_windows\x64\Debug</code> |
| 76 | </td> |
| 77 | </tr> |
| 78 | <tr> |
| 79 | <td> |
| 80 | <code class="filename">build_windows\x64\Release</code> |
| 81 | </td> |
| 82 | </tr> |
| 83 | </table> |
| 84 | <p> |
| 85 | The managed assembly and all C# example programs will be placed in one of |
| 86 | the following subdirectories, depending upon the chosen configuration: |
| 87 | </p> |
| 88 | <table class="simplelist" border="0" summary="Simple list"> |
| 89 | <tr> |
| 90 | <td> |
| 91 | <code class="filename">build_windows\AnyCPU\Debug</code> |
| 92 | </td> |
| 93 | </tr> |
| 94 | <tr> |
| 95 | <td> |
| 96 | <code class="filename">build_windows\AnyCPU\Release</code> |
| 97 | </td> |
| 98 | </tr> |
| 99 | </table> |
| 100 | <p> |
| 101 | The native libraries need to be locatable by the .NET platform, meaning |
| 102 | they must be copied into an application's directory, the Windows or |
| 103 | System directory, or their location must be added to the PATH |
| 104 | environment variable. The example programs demonstrate how to |
| 105 | programmatically edit the PATH variable. |
| 106 | </p> |
| 107 | </div> |
| 108 | <div class="navfooter"> |
| 109 | <hr /> |
| 110 | <table width="100%" summary="Navigation footer"> |
| 111 | <tr> |
| 112 | <td width="40%" align="left"><a accesskey="p" href="build_win_java.html">Prev</a> </td> |
| 113 | <td width="20%" align="center"> |
| 114 | <a accesskey="u" href="build_win.html">Up</a> |
| 115 | </td> |
| 116 | <td width="40%" align="right"> <a accesskey="n" href="build_win_sql.html">Next</a></td> |
| 117 | </tr> |
| 118 | <tr> |
| 119 | <td width="40%" align="left" valign="top">Building the Java API </td> |
| 120 | <td width="20%" align="center"> |
| 121 | <a accesskey="h" href="index.html">Home</a> |
| 122 | </td> |
| 123 | <td width="40%" align="right" valign="top"> Building the SQL API</td> |
| 124 | </tr> |
| 125 | </table> |
| 126 | </div> |
| 127 | </body> |
| 128 | </html> |