blob: 9a9644d68b331c2cd4cb3551377fb190c71a9f85 [file] [log] [blame]
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<author email="nicko at apache dot org">Nicko Cadell</author>
<title>Apache log4net: Building log4net</title>
</properties>
<meta name="keywords" content="building log4net, log4net" />
<body>
<section id="main" name="Building Apache log4net&#x2122;">
<p>
The log4net release builds are built using NAnt. Log4net can also be built
using Visual Studio .NET 2008 or 2010.
</p>
<section id="vsnet" name="Visual Studio">
<p>
Visual Studio .NET 2008 and 2010 are supported build platforms for log4net.
</p>
<section id="vsnet-2008" name="Visual Studio .NET 2008">
<p>
The log4net distribution includes a solution and project file
for Visual Studio .NET 2008. Open the <span class="code">log4net.vs2008.sln</span>
from the src directory in the distribution.
</p>
<p>
The log4net project requires only the following references:
</p>
<ul>
<li>System</li>
<li>System.Configuration</li>
<li>System.Data</li>
<li>System.Web</li>
<li>System.XML</li>
</ul>
</section>
<section id="vsnet-2010" name="Visual Studio .NET 2010">
<p>
The log4net distribution includes a solution and project file
for Visual Studio .NET 2010. Open the <span class="code">log4net.vs2010.sln</span>
from the src directory in the distribution.
</p>
<p>
The log4net project requires only the following references:
</p>
<ul>
<li>System</li>
<li>System.Configuration</li>
<li>System.Data</li>
<li>System.Web</li>
<li>System.XML</li>
</ul>
</section>
</section>
<section id="nant" name="NAnt">
<p>
The log4net distribution is built using the NAnt tool.
A recent NAnt version 0.91 alpha2 is required to build log4net, this is
available from <a href="http://nant.sourceforge.net">nant.sourceforge.net</a>.
</p>
<p>
To support building log4net for the SSCLI framework the NAnt configuration
files need to be updated to specify the SSCLI framework directory.
</p>
<p>
To build log4net from the command line, change directory to the root of the
log4net distribution, ensure that the nant executable is in the
PATH, and then run the following command:
</p>
<div class="syntax"><pre class="code">
nant -buildfile:log4net.build compile-all</pre></div>
<p>
This command will build log4net for all the supported frameworks
that are available on the current machine. To list all the build
targets that are available run the following command:
</p>
<div class="syntax"><pre class="code">
nant -buildfile:log4net.build -projecthelp</pre></div>
<p>
Under windows the <span class="code">build.cmd</span> can be used
to script the nant build. This can be called from a different
directory and will locate the correct log4net.build file to use.
For example:
</p>
<div class="syntax"><pre class="code">
build.cmd compile-all</pre></div>
</section>
<section id="sdk" name="SDK Reference">
<p>
<a href="https://github.com/EWSoftware/SHFB">Sandcastle
Helpfile Builder</a> is used to build the log4net SDK
documentation. Running it is currently not
integrated with the NAnt build process, you'll
have to open and run <code>log4net.shfbproj</code>
with SHFB manually.
</p>
</section>
</section>
</body>
</document>