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.xml 5.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <?xml version="1.0"?>
  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. <document>
  17. <properties>
  18. <index value="1"/>
  19. <title>.NET Ant Library</title>
  20. </properties>
  21. <body>
  22. <section name="Idea">
  23. <p>This library doesn't strive to replace NAnt or MSBuild, its
  24. main purpose is to help those of us who work on projects
  25. crossing platform boundaries. With this library you can use Ant
  26. to build and test the Java as well as the .NET parts of your
  27. project.</p>
  28. <p>This library provides a special version of the
  29. <code>&lt;exec&gt;</code> task tailored to run .NET executables.
  30. On Windows it will assume the Microsoft framework is around and
  31. run the executable directly, while it will invoke Mono on any
  32. other platform. Of course you can override these
  33. assumptions.</p>
  34. <p>Based on this a few tasks to run well known .NET utilities
  35. from within Ant are provided, namely tasks to run <a
  36. href="http://www.nunit.org/">NUnit</a>, <a
  37. href="http://nant.sf.net/">NAnt</a>, <a
  38. href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=27&amp;SiteID=1">MSBuild</a>
  39. and the <a href="http://wix.sf.net/">Wix</a> toolkit.</p>
  40. <p>The initial .NET tasks of Ant (compiler tasks for C#, J# and VB.NET
  41. for example) have also been moved to this Antlib and will see further
  42. development here.</p>
  43. </section>
  44. <section name="Tasks">
  45. <subsection name="dotnetexec">
  46. <p>Runs a .NET executable.</p>
  47. </subsection>
  48. <subsection name="nunit">
  49. <p>Runs NUnit tests.</p>
  50. </subsection>
  51. <subsection name="nant">
  52. <p>Invokes NAnt, either on an external file or a build file
  53. snippet contained inside your Ant build file.</p>
  54. </subsection>
  55. <subsection name="msbuild">
  56. <p>Invokes MSBuild, either on an external file or a build file
  57. snippet contained inside your Ant build file.</p>
  58. </subsection>
  59. <subsection name="wix">
  60. <p>Invokes the candle and light executables of the WiX toolkit
  61. in order to create MSI installers from within Ant.</p>
  62. </subsection>
  63. </section>
  64. <section name="Examples">
  65. <subsection name="nant">
  66. <source><![CDATA[
  67. <project xmlns:dn="antlib:org.apache.ant.dotnet">
  68. <dn:nant>
  69. <build>
  70. <echo message="Hello world"/>
  71. </build>
  72. </dn:nant>
  73. </project>
  74. ]]></source>
  75. <p>runs NAnt on the embedded <code>&lt;echo&gt;</code>
  76. task, output looks like</p>
  77. <source><![CDATA[
  78. Buildfile: test.xml
  79. [dn:nant] NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005)
  80. [dn:nant] Copyright (C) 2001-2005 Gerry Shaw
  81. [dn:nant] http://nant.sourceforge.net
  82. [dn:nant]
  83. [dn:nant] Buildfile: file:///c:/DOKUME~1/STEFAN~1.BOD/LOKALE~1/Temp/build1058451555.xml
  84. [dn:nant] Target framework: Microsoft .NET Framework 1.1
  85. [dn:nant]
  86. [dn:nant] [echo] Hello world
  87. [dn:nant]
  88. [dn:nant] BUILD SUCCEEDED
  89. [dn:nant]
  90. [dn:nant] Total time: 0.2 seconds.
  91. BUILD SUCCESSFUL
  92. Total time: 2 seconds]]></source>
  93. </subsection>
  94. <subsection name="msbuild">
  95. <source><![CDATA[
  96. <project xmlns:dn="antlib:org.apache.ant.dotnet">
  97. <dn:msbuild>
  98. <build>
  99. <Message Text="Hello world"
  100. xmlns="http://schemas.microsoft.com/developer/msbuild/2003"/>
  101. </build>
  102. </dn:msbuild>
  103. </project>]]></source>
  104. <p>runs MSBuild on the embedded <code>&lt;Message&gt;</code>
  105. task, output looks like</p>
  106. <source><![CDATA[
  107. Buildfile: test.xml
  108. [dn:msbuild] Microsoft (R) Build Engine Version 2.0.50727.42
  109. [dn:msbuild] [Microsoft .NET Framework, Version 2.0.50727.42]
  110. [dn:msbuild] Copyright (C) Microsoft Corporation 2005. All rights reserved.
  111. [dn:msbuild] Build started 15.12.2005 20:21:56.
  112. [dn:msbuild] __________________________________________________
  113. [dn:msbuild] Project "c:\Dokumente und Einstellungen\stefan.bodewig\Lokale Einstellungen\Temp\build1543310185.xml" (default targets):
  114. [dn:msbuild] Target generated-by-ant:
  115. [dn:msbuild] Hello world
  116. [dn:msbuild] Build succeeded.
  117. [dn:msbuild] 0 Warning(s)
  118. [dn:msbuild] 0 Error(s)
  119. [dn:msbuild] Time Elapsed 00:00:00.10
  120. BUILD SUCCESSFUL
  121. Total time: 0 seconds
  122. ]]></source>
  123. </subsection>
  124. </section>
  125. </body>
  126. </document>