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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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://cwiki.apache.org/IVY/">Wiki</a>
  127. </li>
  128. </ul>
  129. </li>
  130. <li class="menuheader">IvyDE
  131. <ul>
  132. <li>
  133. <a href="../../projects/ivyde.html">Introduction</a>
  134. </li>
  135. <li>
  136. <a href="http://ant.apache.org/ivy/ivyde">Homepage</a>
  137. </li>
  138. <li>
  139. <a href="http://ant.apache.org/ivy/ivyde/screenshots.html">Screenshots</a>
  140. </li>
  141. <li>
  142. <a href="http://ant.apache.org/ivy/ivyde/download.cgi">Distributions</a>
  143. </li>
  144. </ul>
  145. </li>
  146. </ul>
  147. </div>
  148. <center>
  149. <a href="http://www.apache.org/events/current-event.html"><img border="0" title="ApacheCon" alt="ApacheCon - logo" src="http://www.apache.org/events/current-event-125x125.png" style="width: 125px;height: 125px;"></a>
  150. </center>
  151. <img style="float: left" height="10" width="10" border="0" alt="" src="../../images/menu-left.gif">
  152. <img style="float: right" height="10" width="10" border="0" alt="" src="../../images/menu-right.gif">
  153. </div>
  154. <div class="lightbluebar">&nbsp;</div>
  155. <div class="main">
  156. <div class="content">
  157. <h1 class="title">.NET Ant Library</h1>
  158. <h3 class="section">
  159. <a name=".NET Ant Library 1.0"></a>
  160. .NET Ant Library 1.0
  161. </h3>
  162. <h3>November 6, 2006 - Apache .NET Ant Library 1.0
  163. Available</h3>
  164. <p>Apache .NET Ant Library 1.0 is now available for
  165. download as <a href="http://ant.apache.org/antlibs/bindownload.cgi">binary</a>
  166. or <a href="http://ant.apache.org/antlibs/srcdownload.cgi">source</a>
  167. release.</p>
  168. <h3 class="section">
  169. <a name="Idea"></a>
  170. Idea
  171. </h3>
  172. <p>This library doesn't strive to replace NAnt or MSBuild, its
  173. main purpose is to help those of us who work on projects
  174. crossing platform boundaries. With this library you can use Ant
  175. to build and test the Java as well as the .NET parts of your
  176. project.</p>
  177. <p>This library provides a special version of the
  178. <code>&lt;exec&gt;</code> task tailored to run .NET executables.
  179. On Windows it will assume the Microsoft framework is around and
  180. run the executable directly, while it will invoke Mono on any
  181. other platform. Of course you can override these
  182. assumptions.</p>
  183. <p>Based on this a few tasks to run well known .NET utilities
  184. 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>
  185. and the <a href="http://wix.sf.net/">Wix</a> toolkit.</p>
  186. <p>The initial .NET tasks of Ant (compiler tasks for C#, J# and VB.NET
  187. for example) have also been moved to this Antlib and will see further
  188. development here.</p>
  189. <h3 class="section">
  190. <a name="Tasks"></a>
  191. Tasks
  192. </h3>
  193. <h4 class="subsection">
  194. <a name="dotnetexec"></a>
  195. dotnetexec
  196. </h4>
  197. <p>Runs a .NET executable.</p>
  198. <h4 class="subsection">
  199. <a name="nunit"></a>
  200. nunit
  201. </h4>
  202. <p>Runs NUnit tests.</p>
  203. <h4 class="subsection">
  204. <a name="nant"></a>
  205. nant
  206. </h4>
  207. <p>Invokes NAnt, either on an external file or a build file
  208. snippet contained inside your Ant build file.</p>
  209. <h4 class="subsection">
  210. <a name="msbuild"></a>
  211. msbuild
  212. </h4>
  213. <p>Invokes MSBuild, either on an external file or a build file
  214. snippet contained inside your Ant build file.</p>
  215. <h4 class="subsection">
  216. <a name="wix"></a>
  217. wix
  218. </h4>
  219. <p>Invokes the candle and light executables of the WiX toolkit
  220. in order to create MSI installers from within Ant.</p>
  221. <h3 class="section">
  222. <a name="Examples"></a>
  223. Examples
  224. </h3>
  225. <h4 class="subsection">
  226. <a name="nant"></a>
  227. nant
  228. </h4>
  229. <pre class="code">
  230. &lt;project xmlns:dn=&quot;antlib:org.apache.ant.dotnet&quot;&gt;
  231. &lt;dn:nant&gt;
  232. &lt;build&gt;
  233. &lt;echo message=&quot;Hello world&quot;/&gt;
  234. &lt;/build&gt;
  235. &lt;/dn:nant&gt;
  236. &lt;/project&gt;
  237. </pre>
  238. <p>runs NAnt on the embedded <code>&lt;echo&gt;</code>
  239. task, output looks like</p>
  240. <pre class="code">
  241. Buildfile: test.xml
  242. [dn:nant] NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005)
  243. [dn:nant] Copyright (C) 2001-2005 Gerry Shaw
  244. [dn:nant] http://nant.sourceforge.net
  245. [dn:nant]
  246. [dn:nant] Buildfile: file:///c:/DOKUME~1/STEFAN~1.BOD/LOKALE~1/Temp/build1058451555.xml
  247. [dn:nant] Target framework: Microsoft .NET Framework 1.1
  248. [dn:nant]
  249. [dn:nant] [echo] Hello world
  250. [dn:nant]
  251. [dn:nant] BUILD SUCCEEDED
  252. [dn:nant]
  253. [dn:nant] Total time: 0.2 seconds.
  254. BUILD SUCCESSFUL
  255. Total time: 2 seconds</pre>
  256. <h4 class="subsection">
  257. <a name="msbuild"></a>
  258. msbuild
  259. </h4>
  260. <pre class="code">
  261. &lt;project xmlns:dn=&quot;antlib:org.apache.ant.dotnet&quot;&gt;
  262. &lt;dn:msbuild&gt;
  263. &lt;build&gt;
  264. &lt;Message Text=&quot;Hello world&quot;
  265. xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;/&gt;
  266. &lt;/build&gt;
  267. &lt;/dn:msbuild&gt;
  268. &lt;/project&gt;</pre>
  269. <p>runs MSBuild on the embedded <code>&lt;Message&gt;</code>
  270. task, output looks like</p>
  271. <pre class="code">
  272. Buildfile: test.xml
  273. [dn:msbuild] Microsoft (R) Build Engine Version 2.0.50727.42
  274. [dn:msbuild] [Microsoft .NET Framework, Version 2.0.50727.42]
  275. [dn:msbuild] Copyright (C) Microsoft Corporation 2005. All rights reserved.
  276. [dn:msbuild] Build started 15.12.2005 20:21:56.
  277. [dn:msbuild] __________________________________________________
  278. [dn:msbuild] Project &quot;c:\Dokumente und Einstellungen\stefan.bodewig\Lokale Einstellungen\Temp\build1543310185.xml&quot; (default targets):
  279. [dn:msbuild] Target generated-by-ant:
  280. [dn:msbuild] Hello world
  281. [dn:msbuild] Build succeeded.
  282. [dn:msbuild] 0 Warning(s)
  283. [dn:msbuild] 0 Error(s)
  284. [dn:msbuild] Time Elapsed 00:00:00.10
  285. BUILD SUCCESSFUL
  286. Total time: 0 seconds
  287. </pre>
  288. </div>
  289. </div>
  290. <p class="copyright">
  291. <script type="text/javascript" language="JavaScript"><!--
  292. document.write(" - "+"Last Published: " + document.lastModified);
  293. // -->
  294. </script>
  295. </p>
  296. </body>
  297. </html>