You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 13 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html lang="en">
  3. <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
  4. <head>
  5. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  6. <title>Apache Ant - .NET Ant Library</title>
  7. <link type="text/css" href="../../page.css" rel="stylesheet">
  8. </head>
  9. <body>
  10. <p class="navpath">
  11. <script src="../../breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  12. </p>
  13. <div class="logobar">
  14. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  15. <tr>
  16. <td align="left"><img border="0" alt="Apache Ant site" src="../../images/group-logo.gif"></td>
  17. <td align="center" width="100%"><img alt="Apache Ant logo" border="0" src="../../images/project-logo.gif"></td>
  18. <td align="right">
  19. <form target="_blank" onsubmit="q.value = query.value + ' site:ant.apache.org'" action="http://www.google.com/search" method="get">
  20. <table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="#4C6C8F">
  21. <tr>
  22. <td colspan="3"><img height="10" width="1" alt="" src="../../images/spacer.gif"></td>
  23. </tr>
  24. <tr>
  25. <td><img height="1" width="1" alt="" src="../../images/spacer.gif"></td>
  26. <td nowrap="nowrap" class="searchcaption">
  27. <input name="q" type="hidden">
  28. <input size="15" id="query" type="text">
  29. <img height="1" width="5" alt="" src="../../images/spacer.gif">
  30. <input name="Search" value="Search" type="submit">
  31. <br>
  32. the Apache Ant site
  33. </td>
  34. <td><img height="1" width="1" alt="" src="../../images/spacer.gif"></td>
  35. </tr>
  36. <tr>
  37. <td><img alt="" border="0" height="10" width="9" src="../../images/search-left.gif"></td>
  38. <td><img height="1" width="1" alt="" src="../../images/spacer.gif"></td>
  39. <td><img alt="" border="0" height="10" width="9" src="../../images/search-right.gif"></td>
  40. </tr>
  41. </table>
  42. </form>
  43. </td>
  44. </tr>
  45. </table>
  46. </div>
  47. <div class="tab">
  48. <table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
  49. <tr>
  50. <td width="5"><img alt="" height="8" width="8" src="../../images/spacer.gif"></td><td valign="bottom">
  51. <table summary="non selected tab" style="height: 1.4em" border="0" cellpadding="0" cellspacing="0">
  52. <tr>
  53. <td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../images/tab-left.gif"></td><td valign="middle" bgcolor="#B2C4E0"><a href="../../index.html"><font size="2" face="Arial, Helvetica, Sans-serif">Home</font></a></td><td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../images/tab-right.gif"></td>
  54. </tr>
  55. </table>
  56. </td>
  57. <td width="8"><img alt="" height="5" width="8" src="../../images/spacer.gif"></td><td valign="bottom">
  58. <table summary="selected tab" style="height: 1.5em" border="0" cellpadding="0" cellspacing="0">
  59. <tr>
  60. <td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="../../images/tabSel-left.gif"></td><td valign="middle" bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, Sans-serif"><b>Projects</b></font></td><td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="../../images/tabSel-right.gif"></td>
  61. </tr>
  62. </table>
  63. </td>
  64. </tr>
  65. </table>
  66. </div>
  67. <div class="bluebar"></div>
  68. <div class="menucontainer">
  69. <div class="menu">
  70. <ul>
  71. <li class="menuheader">Projects
  72. <ul>
  73. <li>
  74. <a href="../../projects/index.html">Welcome</a>
  75. </li>
  76. </ul>
  77. </li>
  78. <li class="menuheader">Ant Libraries
  79. <ul>
  80. <li>
  81. <a href="../../antlibs/index.html">Introduction</a>
  82. </li>
  83. <li>
  84. <a href="../../antlibs/charter.html">Charter</a>
  85. </li>
  86. <li>
  87. <a href="../../antlibs/proper.html">Ant Libraries</a>
  88. </li>
  89. <li>
  90. <a href="../../antlibs/sandbox.html">Sandbox Ant Libraries</a>
  91. </li>
  92. <li>
  93. <a href="http://ant.apache.org/antlibs/bindownload.cgi">Binary Distributions</a>
  94. </li>
  95. <li>
  96. <a href="http://ant.apache.org/antlibs/srcdownload.cgi">Source Distributions</a>
  97. </li>
  98. </ul>
  99. </li>
  100. <li class="menuheader">Ivy
  101. <ul>
  102. <li>
  103. <a href="../../projects/ivy.html">Introduction</a>
  104. </li>
  105. <li>
  106. <a href="http://incubator.apache.org/ivy/">Homepage</a>
  107. </li>
  108. <li>
  109. <a href="http://people.apache.org/dist/incubator/ivy/">Binary Distributions</a>
  110. </li>
  111. <li>
  112. <a href="http://people.apache.org/dist/incubator/ivy/">Source Distributions</a>
  113. </li>
  114. <li>
  115. <a href="http://incubator.apache.org/ivy/wiki.html">Wiki</a>
  116. </li>
  117. </ul>
  118. </li>
  119. </ul>
  120. </div>
  121. <center>
  122. <!--#include virtual="/ads/buttonbar.html" -->
  123. </center>
  124. <img style="float: left" height="10" width="10" border="0" alt="" src="../../images/menu-left.gif">
  125. <img style="float: right" height="10" width="10" border="0" alt="" src="../../images/menu-right.gif">
  126. </div>
  127. <div class="lightbluebar">&nbsp;</div>
  128. <div class="main">
  129. <div class="content">
  130. <h1 class="title">.NET Ant Library</h1>
  131. <h3 class="section">
  132. <a name=".NET Ant Library 1.0"></a>
  133. .NET Ant Library 1.0
  134. </h3>
  135. <h3>November 6, 2006 - Apache .NET Ant Library 1.0
  136. Available</h3>
  137. <p>Apache .NET Ant Library 1.0 is now available for
  138. download as <a href="http://ant.apache.org/antlibs/bindownload.cgi">binary</a>
  139. or <a href="http://ant.apache.org/antlibs/srcdownload.cgi">source</a>
  140. release.</p>
  141. <h3 class="section">
  142. <a name="Idea"></a>
  143. Idea
  144. </h3>
  145. <p>This library doesn't strive to replace NAnt or MSBuild, its
  146. main purpose is to help those of us who work on projects
  147. crossing platform boundaries. With this library you can use Ant
  148. to build and test the Java as well as the .NET parts of your
  149. project.</p>
  150. <p>This library provides a special version of the
  151. <code>&lt;exec&gt;</code> task tailored to run .NET executables.
  152. On Windows it will assume the Microsoft framework is around and
  153. run the executable directly, while it will invoke Mono on any
  154. other platform. Of course you can override these
  155. assumptions.</p>
  156. <p>Based on this a few tasks to run well known .NET utilities
  157. from within Ant are provided, namely tasks to run <a href="http://www.nunit.org/">NUnit</a>, <a href="http://nant.sf.net/">NAnt</a>, <a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=27&amp;SiteID=1">MSBuild</a>
  158. and the <a href="http://wix.sf.net/">Wix</a> toolkit.</p>
  159. <p>The initial .NET tasks of Ant (compiler tasks for C#, J# and VB.NET
  160. for example) have also been moved to this Antlib and will see further
  161. development here.</p>
  162. <h3 class="section">
  163. <a name="Tasks"></a>
  164. Tasks
  165. </h3>
  166. <h4 class="subsection">
  167. <a name="dotnetexec"></a>
  168. dotnetexec
  169. </h4>
  170. <p>Runs a .NET executable.</p>
  171. <h4 class="subsection">
  172. <a name="nunit"></a>
  173. nunit
  174. </h4>
  175. <p>Runs NUnit tests.</p>
  176. <h4 class="subsection">
  177. <a name="nant"></a>
  178. nant
  179. </h4>
  180. <p>Invokes NAnt, either on an external file or a build file
  181. snippet contained inside your Ant build file.</p>
  182. <h4 class="subsection">
  183. <a name="msbuild"></a>
  184. msbuild
  185. </h4>
  186. <p>Invokes MSBuild, either on an external file or a build file
  187. snippet contained inside your Ant build file.</p>
  188. <h4 class="subsection">
  189. <a name="wix"></a>
  190. wix
  191. </h4>
  192. <p>Invokes the candle and light executables of the WiX toolkit
  193. in order to create MSI installers from within Ant.</p>
  194. <h3 class="section">
  195. <a name="Examples"></a>
  196. Examples
  197. </h3>
  198. <h4 class="subsection">
  199. <a name="nant"></a>
  200. nant
  201. </h4>
  202. <pre class="code">
  203. &lt;project xmlns:dn=&quot;antlib:org.apache.ant.dotnet&quot;&gt;
  204. &lt;dn:nant&gt;
  205. &lt;build&gt;
  206. &lt;echo message=&quot;Hello world&quot;/&gt;
  207. &lt;/build&gt;
  208. &lt;/dn:nant&gt;
  209. &lt;/project&gt;
  210. </pre>
  211. <p>runs NAnt on the embedded <code>&lt;echo&gt;</code>
  212. task, output looks like</p>
  213. <pre class="code">
  214. Buildfile: test.xml
  215. [dn:nant] NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005)
  216. [dn:nant] Copyright (C) 2001-2005 Gerry Shaw
  217. [dn:nant] http://nant.sourceforge.net
  218. [dn:nant]
  219. [dn:nant] Buildfile: file:///c:/DOKUME~1/STEFAN~1.BOD/LOKALE~1/Temp/build1058451555.xml
  220. [dn:nant] Target framework: Microsoft .NET Framework 1.1
  221. [dn:nant]
  222. [dn:nant] [echo] Hello world
  223. [dn:nant]
  224. [dn:nant] BUILD SUCCEEDED
  225. [dn:nant]
  226. [dn:nant] Total time: 0.2 seconds.
  227. BUILD SUCCESSFUL
  228. Total time: 2 seconds</pre>
  229. <h4 class="subsection">
  230. <a name="msbuild"></a>
  231. msbuild
  232. </h4>
  233. <pre class="code">
  234. &lt;project xmlns:dn=&quot;antlib:org.apache.ant.dotnet&quot;&gt;
  235. &lt;dn:msbuild&gt;
  236. &lt;build&gt;
  237. &lt;Message Text=&quot;Hello world&quot;
  238. xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;/&gt;
  239. &lt;/build&gt;
  240. &lt;/dn:msbuild&gt;
  241. &lt;/project&gt;</pre>
  242. <p>runs MSBuild on the embedded <code>&lt;Message&gt;</code>
  243. task, output looks like</p>
  244. <pre class="code">
  245. Buildfile: test.xml
  246. [dn:msbuild] Microsoft (R) Build Engine Version 2.0.50727.42
  247. [dn:msbuild] [Microsoft .NET Framework, Version 2.0.50727.42]
  248. [dn:msbuild] Copyright (C) Microsoft Corporation 2005. All rights reserved.
  249. [dn:msbuild] Build started 15.12.2005 20:21:56.
  250. [dn:msbuild] __________________________________________________
  251. [dn:msbuild] Project &quot;c:\Dokumente und Einstellungen\stefan.bodewig\Lokale Einstellungen\Temp\build1543310185.xml&quot; (default targets):
  252. [dn:msbuild] Target generated-by-ant:
  253. [dn:msbuild] Hello world
  254. [dn:msbuild] Build succeeded.
  255. [dn:msbuild] 0 Warning(s)
  256. [dn:msbuild] 0 Error(s)
  257. [dn:msbuild] Time Elapsed 00:00:00.10
  258. BUILD SUCCESSFUL
  259. Total time: 0 seconds
  260. </pre>
  261. </div>
  262. </div>
  263. <p class="copyright">
  264. <script type="text/javascript" language="JavaScript"><!--
  265. document.write(" - "+"Last Published: " + document.lastModified);
  266. // -->
  267. </script>
  268. </p>
  269. </body>
  270. </html>