blob: b15f65519ba6baf78cd7028a8556a7e1013530a0 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at Sep 9, 2013 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
Apache log4net: Building log4net</title>
<style type="text/css" media="all">
@import url("../css/maven-base.css");
@import url("../css/maven-theme.css");
@import url("../css/site.css");
</style>
<link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
<meta name="author" content="Nicko Cadell" />
<meta name="Date-Revision-yyyymmdd" content="20130909" />
<meta http-equiv="Content-Language" content="en" />
<meta name="keywords" content="building log4net, log4net" />
</head>
<body class="composite">
<div id="banner">
<a href="../../" id="bannerLeft">
<img src="../images/ls-logo.jpg" alt="Apache Logging Services Project" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2013-09-09</span>
&nbsp;| <span id="projectVersion">Version: 1.2.12</span>
| <a href="http://www.apache.org/" class="externalLink" title="Apache">Apache</a>
&gt;
<a href="../../" title="Logging Services">Logging Services</a>
&gt;
<a href=".././" title="log4net">log4net</a>
&gt;
Apache log4net: Building log4net
</div>
<div class="xright">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>Apache log4net</h5>
<ul>
<li class="none">
<a href="../index.html" title="About">About</a>
</li>
<li class="none">
<a href="../download_log4net.cgi" title="Download">Download</a>
</li>
<li class="none">
<a href="../release/release-notes.html" title="Release Notes">Release Notes</a>
</li>
<li class="none">
<a href="../license.html" title="License">License</a>
</li>
</ul>
<h5>Documentation</h5>
<ul>
<li class="none">
<a href="../release/features.html" title="Features">Features</a>
</li>
<li class="none">
<a href="../release/framework-support.html" title="Supported Frameworks">Supported Frameworks</a>
</li>
<li class="none">
<a href="../release/example-apps.html" title="Example Apps">Example Apps</a>
</li>
<li class="none">
<a href="../release/config-examples.html" title="Config Examples">Config Examples</a>
</li>
<li class="none">
<strong>Building</strong>
</li>
<li class="none">
<a href="../release/faq.html" title="FAQ">FAQ</a>
</li>
<li class="none">
<a href="../release/howto/index.html" title="How Tos">How Tos</a>
</li>
<li class="none">
<a href="../release/sdk/index.html" title="SDK Reference">SDK Reference</a>
</li>
</ul>
<h5>Manual</h5>
<ul>
<li class="none">
<a href="../release/manual/introduction.html" title="Introduction">Introduction</a>
</li>
<li class="none">
<a href="../release/manual/configuration.html" title="Configuration">Configuration</a>
</li>
<li class="none">
<a href="../release/manual/contexts.html" title="Contexts">Contexts</a>
</li>
<li class="none">
<a href="../release/manual/plugins.html" title="Plugins">Plugins</a>
</li>
<li class="none">
<a href="../release/manual/repositories.html" title="Repositories">Repositories</a>
</li>
<li class="none">
<a href="../release/manual/internals.html" title="Internals">Internals</a>
</li>
</ul>
<h5>Community</h5>
<ul>
<li class="none">
<a href="../mail-lists.html" title="Mailing Lists">Mailing Lists</a>
</li>
<li class="none">
<a href="../issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
</li>
</ul>
<h5>Development</h5>
<ul>
<li class="none">
<a href="../source-repository.html" title="Repository">Repository</a>
</li>
<li class="none">
<a href="../integration.html" title="Continuous Integration">Continuous Integration</a>
</li>
</ul>
<h5>Project Documentation</h5>
<ul>
<li class="collapsed">
<a href="../project-info.html" title="Project Information">Project Information</a>
</li>
<li class="collapsed">
<a href="../project-reports.html" title="Project Reports">Project Reports</a>
</li>
</ul>
<h5>Apache</h5>
<ul>
<li class="none">
<a href="http://www.apache.org/" class="externalLink" title="Home">Home</a>
</li>
<li class="none">
<a href="http://www.apache.org/licenses/" class="externalLink" title="License">License</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">Sponsorship</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">Thanks</a>
</li>
<li class="none">
<a href="http://www.apache.org/security/" class="externalLink" title="Security">Security</a>
</li>
<li class="none">
<a href="http://www.apachecon.com" class="externalLink" title="Conferences">Conferences</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- 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. -->
<a name="main"></a><div class="section"><h2 id="main">Building Apache log4net&#x2122;</h2>
<p>
The log4net release builds are built using NAnt. Log4net can also be built
using Visual Studio .NET 2008 or 2010.
</p>
<a name="vsnet"></a><div class="section"><h2 id="vsnet">Visual Studio</h2>
<p>
Visual Studio .NET 2008 and 2010 are supported build platforms for log4net.
</p>
<a name="vsnet-2008"></a><div class="section"><h2 id="vsnet-2008">Visual Studio .NET 2008</h2>
<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>
</div>
<a name="vsnet-2010"></a><div class="section"><h2 id="vsnet-2010">Visual Studio .NET 2010</h2>
<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>
</div>
</div>
<a name="nant"></a><div class="section"><h2 id="nant">NAnt</h2>
<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 class="externalLink" 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"><div class="code"><pre>
nant -buildfile:log4net.build compile-all</pre></div></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"><div class="code"><pre>
nant -buildfile:log4net.build -projecthelp</pre></div></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"><div class="code"><pre>
build.cmd compile-all</pre></div></div>
</div>
<a name="sdk"></a><div class="section"><h2 id="sdk">SDK Reference</h2>
<p>
NDoc 1.3 is used to build the log4net SDK
documentation using the <span class="code">generate-sdkdoc</span> target in
log4net's Nant build file.
NDoc is available from <a class="externalLink" href="http://ndoc.sourceforge.net">ndoc.sourceforge.net</a>.
</p>
</div>
<a name="html"></a><div class="section"><h2 id="html">HTML Documentation</h2>
<p>
The log4net HTML documentation is built using Apache Maven.
The source are files in various formats in the <span class="code">src/site</span> directory.
Building the documentation requires Java 5 or newer and Maven 2.2.1 or newer.
Run mvn from within the root directory.
</p>
<p>SDK documentation for the site is built using the
<span class="code">generate-sdkdoc-for-site</span> target in
log4net's NAnt build file.</p>
<p>It is not recommended to use mvn's <span class="code">site:deploy</span> goal but rather to
deploy the site generated to <span class="code">target/site</span> manually.</p>
</div>
</div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
<div class="xright">Copyright &#169; 2004-2013
<a href="http://www.apache.org">Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License, Version 2.0</a>.</div><br />
<div class="xright">Apache log4net, Apache, log4net, the Apache feather logo, the Apache Logging Services project logo and the Built by Maven logo are trademarks of The Apache Software Foundation.</div>
<div class="clear">
</div>
</div>
</body>
</html>