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.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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> and <a
  36. href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=27&amp;SiteID=1">MSBuild</a>.</p>
  37. <p>There also is some experimental <a
  38. href="http://wix.sf.net/">Wix</a> task, but it probably doesn't
  39. do anything useful at all.</p>
  40. </section>
  41. <section name="Tasks">
  42. <subsection name="dotnetexec">
  43. <p>Runs a .NET executable.</p>
  44. </subsection>
  45. <subsection name="nunit">
  46. <p>Runs NUnit tests.</p>
  47. </subsection>
  48. <subsection name="nant">
  49. <p>Invokes NAnt, either on an external file or a build file
  50. snippet contained inside your Ant build file.</p>
  51. </subsection>
  52. <subsection name="msbuild">
  53. <p>Invokes MSBuild, either on an external file or a build file
  54. snippet contained inside your Ant build file.</p>
  55. </subsection>
  56. </section>
  57. <section name="Examples">
  58. <subsection name="nant">
  59. <source><![CDATA[
  60. <project xmlns:dn="antlib:org.apache.ant.dotnet">
  61. <dn:nant>
  62. <build>
  63. <echo message="Hello world"/>
  64. </build>
  65. </dn:nant>
  66. </project>
  67. ]]></source>
  68. <p>runs NAnt on the embedded <code>&lt;echo&gt;</code>
  69. task, output looks like</p>
  70. <source><![CDATA[
  71. Buildfile: test.xml
  72. [dn:nant] NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005)
  73. [dn:nant] Copyright (C) 2001-2005 Gerry Shaw
  74. [dn:nant] http://nant.sourceforge.net
  75. [dn:nant]
  76. [dn:nant] Buildfile: file:///c:/DOKUME~1/STEFAN~1.BOD/LOKALE~1/Temp/build1058451555.xml
  77. [dn:nant] Target framework: Microsoft .NET Framework 1.1
  78. [dn:nant]
  79. [dn:nant] [echo] Hello world
  80. [dn:nant]
  81. [dn:nant] BUILD SUCCEEDED
  82. [dn:nant]
  83. [dn:nant] Total time: 0.2 seconds.
  84. BUILD SUCCESSFUL
  85. Total time: 2 seconds]]></source>
  86. </subsection>
  87. <subsection name="msbuild">
  88. <source><![CDATA[
  89. <project xmlns:dn="antlib:org.apache.ant.dotnet">
  90. <dn:msbuild>
  91. <build>
  92. <Message Text="Hello world"
  93. xmlns="http://schemas.microsoft.com/developer/msbuild/2003"/>
  94. </build>
  95. </dn:msbuild>
  96. </project>]]></source>
  97. <p>runs MSBuild on the embedded <code>&lt;Message&gt;</code>
  98. task, output looks like</p>
  99. <source><![CDATA[
  100. Buildfile: test.xml
  101. [dn:msbuild] Microsoft (R) Build Engine Version 2.0.50727.42
  102. [dn:msbuild] [Microsoft .NET Framework, Version 2.0.50727.42]
  103. [dn:msbuild] Copyright (C) Microsoft Corporation 2005. All rights reserved.
  104. [dn:msbuild] Build started 15.12.2005 20:21:56.
  105. [dn:msbuild] __________________________________________________
  106. [dn:msbuild] Project "c:\Dokumente und Einstellungen\stefan.bodewig\Lokale Einstellungen\Temp\build1543310185.xml" (default targets):
  107. [dn:msbuild] Target generated-by-ant:
  108. [dn:msbuild] Hello world
  109. [dn:msbuild] Build succeeded.
  110. [dn:msbuild] 0 Warning(s)
  111. [dn:msbuild] 0 Error(s)
  112. [dn:msbuild] Time Elapsed 00:00:00.10
  113. BUILD SUCCESSFUL
  114. Total time: 0 seconds
  115. ]]></source>
  116. </subsection>
  117. </section>
  118. </body>
  119. </document>