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 4.7 kB

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