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 14 KiB

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