|
| 1 | +<?xml version="1.0" ?> |
| 2 | +<!-- |
| 3 | +Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | +contributor license agreements. See the NOTICE file distributed with |
| 5 | +this work for additional information regarding copyright ownership. |
| 6 | +The ASF licenses this file to you under the Apache License, Version 2.0 |
| 7 | +(the "License"); you may not use this file except in compliance with |
| 8 | +the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | +http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | +Unless required by applicable law or agreed to in writing, software |
| 13 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +See the License for the specific language governing permissions and |
| 16 | +limitations under the License. |
| 17 | +--> |
| 18 | +<document> |
| 19 | + |
| 20 | + <properties> |
| 21 | + <author email="nicko at apache dot org">Nicko Cadell</author> |
| 22 | + <title>Apache log4net: Building log4net</title> |
| 23 | + </properties> |
| 24 | + |
| 25 | + <meta name="keywords" content="building log4net, log4net" /> |
| 26 | + |
| 27 | + <body> |
| 28 | + <section id="main" name="Building Apache log4net™"> |
| 29 | + <p> |
| 30 | + The log4net release builds are built using NAnt. Log4net can also be built |
| 31 | + using Visual Studio .NET 2008 or 2010. |
| 32 | + </p> |
| 33 | + |
| 34 | + <section id="vsnet" name="Visual Studio"> |
| 35 | + <p> |
| 36 | + Visual Studio .NET 2008 and 2010 are supported build platforms for log4net. |
| 37 | + </p> |
| 38 | + |
| 39 | + <section id="vsnet-2008" name="Visual Studio .NET 2008"> |
| 40 | + <p> |
| 41 | + The log4net distribution includes a solution and project file |
| 42 | + for Visual Studio .NET 2008. Open the <span class="code">log4net.vs2008.sln</span> |
| 43 | + from the src directory in the distribution. |
| 44 | + </p> |
| 45 | + <p> |
| 46 | + The log4net project requires only the following references: |
| 47 | + </p> |
| 48 | + <ul> |
| 49 | + <li>System</li> |
| 50 | + <li>System.Configuration</li> |
| 51 | + <li>System.Data</li> |
| 52 | + <li>System.Web</li> |
| 53 | + <li>System.XML</li> |
| 54 | + </ul> |
| 55 | + </section> |
| 56 | + |
| 57 | + <section id="vsnet-2010" name="Visual Studio .NET 2010"> |
| 58 | + <p> |
| 59 | + The log4net distribution includes a solution and project file |
| 60 | + for Visual Studio .NET 2010. Open the <span class="code">log4net.vs2010.sln</span> |
| 61 | + from the src directory in the distribution. |
| 62 | + </p> |
| 63 | + <p> |
| 64 | + The log4net project requires only the following references: |
| 65 | + </p> |
| 66 | + <ul> |
| 67 | + <li>System</li> |
| 68 | + <li>System.Configuration</li> |
| 69 | + <li>System.Data</li> |
| 70 | + <li>System.Web</li> |
| 71 | + <li>System.XML</li> |
| 72 | + </ul> |
| 73 | + </section> |
| 74 | + </section> |
| 75 | + |
| 76 | + <section id="nant" name="NAnt"> |
| 77 | + <p> |
| 78 | + The log4net distribution is built using the NAnt tool. |
| 79 | + A recent NAnt version 0.91 alpha2 is required to build log4net, this is |
| 80 | + available from <a href="http://nant.sourceforge.net">nant.sourceforge.net</a>. |
| 81 | + </p> |
| 82 | + <p> |
| 83 | + To support building log4net for the SSCLI framework the NAnt configuration |
| 84 | + files need to be updated to specify the SSCLI framework directory. |
| 85 | + </p> |
| 86 | + <p> |
| 87 | + To build log4net from the command line, change directory to the root of the |
| 88 | + log4net distribution, ensure that the nant executable is in the |
| 89 | + PATH, and then run the following command: |
| 90 | + </p> |
| 91 | + <div class="syntax"><pre class="code"> |
| 92 | +nant -buildfile:log4net.build compile-all</pre></div> |
| 93 | + <p> |
| 94 | + This command will build log4net for all the supported frameworks |
| 95 | + that are available on the current machine. To list all the build |
| 96 | + targets that are available run the following command: |
| 97 | + </p> |
| 98 | + <div class="syntax"><pre class="code"> |
| 99 | +nant -buildfile:log4net.build -projecthelp</pre></div> |
| 100 | + <p> |
| 101 | + Under windows the <span class="code">build.cmd</span> can be used |
| 102 | + to script the nant build. This can be called from a different |
| 103 | + directory and will locate the correct log4net.build file to use. |
| 104 | + For example: |
| 105 | + </p> |
| 106 | + <div class="syntax"><pre class="code"> |
| 107 | +build.cmd compile-all</pre></div> |
| 108 | + </section> |
| 109 | + |
| 110 | + <section id="sdk" name="SDK Reference"> |
| 111 | + <p> |
| 112 | + <a href="https://github.com/EWSoftware/SHFB">Sandcastle |
| 113 | + Helpfile Builder</a> is used to build the log4net SDK |
| 114 | + documentation. Running it is currently not |
| 115 | + integrated with the NAnt build process, you'll |
| 116 | + have to open and run <code>log4net.shfbproj</code> |
| 117 | + with SHFB manually. |
| 118 | + </p> |
| 119 | + </section> |
| 120 | + |
| 121 | + </section> |
| 122 | + </body> |
| 123 | +</document> |
0 commit comments