blob: 66272d83f91af823b4edc51d2b30e972ceb48de7 [file] [log] [blame]
<html>
<head>
<meta http-equiv="Content-Language" content="en-us"></meta>
<title>Dotnet Ant Library</title>
</head>
<body>
<h2>Introduction</h2>
<p>This is a library of Ant tasks that support using .NET
executables accross different platforms and in particular support
using common .NET development tools like <a
href="http://nant.sourceforge.net/">NAnt</a> or <a
href="http://www.nunit.org/">NUnit</a> from within Ant.</p>
<h2>Requirements</h2>
<p>The current version requires Ant 1.7 or at least a version
built from svn trunk no earlier than 2005-12-16.</p>
<h2>Where is it?</h2>
<p>The source code for the library lives in Ant's SVN - <a
href="http://svn.apache.org/repos/asf/ant/antlibs/dotnet/trunk/">http://svn.apache.org/repos/asf/ant/antlibs/dotnet/trunk/</a>
A binary can be found at <a
href="http://people.apache.org/~bodewig/dotnet/ant-dotnet.jar">http://cvs.apache.org/~bodewig/dotnet/ant-dotnet.jar</a>.
A zip file containing the docs is also <a
href="http://people.apache.org/~bodewig/dotnet/docs.zip">available</a>.</p>
<p>Note that these are temporary locations and may change later.</p>
<h2>Feedback</h2>
<p>Please direct any feedback to the <a
href="http://ant.apache.org/mail.html#Developer List">Ant
developer list</a>.
<h2>Installation</h2>
<p>If you are building this from sources, run the antlib target
and you'll get a file <code>ant-dotnet.jar</code>. If you've
downloaded <code>dotnet.jar</code>, you are already ready.</p>
<p>There are several ways to use the tasks:</p>
<ul>
<li>The traditional way:
<pre>
&lt;taskdef
resource="org/apache/ant/dotnet/antlib.xml"&gt;
&lt;classpath&gt;
&lt;pathelement location="YOUR-PATH-TO/ant-dotnet.jar"/&gt;
&lt;/classpath&gt;
&lt;/taskdef&gt;
</pre>
With this you can use the tasks like plain Ant tasks, they'll
live in the default namespace. I.e. if you can run
&lt;exec&gt; without any namespace prefix, you can do so for
&lt;dotnetexec&gt; as well.
</li>
<li>Similar, but assigning a namespace URI
<pre>
&lt;taskdef
uri="antlib:org.apache.ant.dotnet"
resource="org/apache/ant/dotnet/antlib.xml"&gt;
&lt;classpath&gt;
&lt;pathelement location="YOUR-PATH-TO/ant-dotnet.jar"/&gt;
&lt;/classpath&gt;
&lt;/taskdef&gt;
</pre>
This puts you task into a separate namespace than Ant's
namespace. You would use the tasks like
<pre>
&lt;project
xmlns:dn="antlib:org.apache.ant.dotnet"
xmlns="antlib:org.apache.tools.ant"&gt;
...
&lt;dn:nant&gt;
&lt;dn:target name="my-target"/&gt;
&lt;/dn:nant&gt;
</pre>
or
<pre>
&lt;nant xmlns="antlib:org.apache.ant.dotnet"&gt;
&lt;target name="my-target"/&gt;
&lt;/nant&gt;
</pre>
or a variation thereof.
</li>
<li>Using Ant's autodiscovery. Place <code>ant-dotnet.jar</code>
into a directory and use <code>ant -lib
DIR-CONTAINING-THE-JAR</code> or copy it into
<code>ANT_HOME/lib</code> - and then in your build file, simply
declare the namespace on the <code>project</code> tag:
<pre>
&lt;project
xmlns:dn="antlib:org.apache.ant.dotnet"
xmlns="antlib:org.apache.tools.ant"&gt;
</pre>
And all tasks of this library will automatically be available
in the <code>dn</code> namespace without any
<code>taskdef</code>.
</li>
</ul>
<h2>Tasks</h2>
<ul>
<li><a href="dotnetexec.html">dotnetexec</a> - run a .NET
assembly that's in your PATH. You can chose the framework that
is going to be used - defaults to Mono on non-Windows platforms
and Microsoft's on Windows.</li>
<li><a href="nant.html">nant</a> - execute the NAnt build
tool.</li>
<li><a href="msbuild.html">msbuild</a> - execute the MSBuild build
tool of Microsoft's .NET framework 2.0.</li>
<li><a href="wix.html">wix</a> - execute the WiX toolset, untested.</li>
<li><a href="nunit.html">nunit</a> - execute the
nunit-console.exe <a href="http://www.nunit.org/">NUnit</a>
test runner.</li>
</ul>
<hr/>
<p align="center">Copyright &copy; 2003-2005 The Apache Software Foundation. All rights Reserved.</p>
</body>
</html>