You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2003/09/27 05:19:49 UTC
cvs commit: ant/docs/manual/OptionalTasks csc.html ilasm.html ildasm.html importtypelib.html jsharp.html wsdltodotnet.html dotnet.html
stevel 2003/09/26 20:19:49
Modified: docs/manual/CoreTypes Tag: ANT_16_BRANCH assertions.html
docs/manual/OptionalTasks Tag: ANT_16_BRANCH dotnet.html
Added: docs/manual/OptionalTasks Tag: ANT_16_BRANCH csc.html
ilasm.html ildasm.html importtypelib.html
jsharp.html wsdltodotnet.html
Log:
port of documentation from 1.7a to 1.6 branch
Revision Changes Path
No revision
No revision
1.2.2.1 +1 -1 ant/docs/manual/CoreTypes/assertions.html
Index: assertions.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/CoreTypes/assertions.html,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- assertions.html 22 Aug 2003 09:20:12 -0000 1.2
+++ assertions.html 27 Sep 2003 03:19:49 -0000 1.2.2.1
@@ -170,7 +170,7 @@
<pre>
<assertions id="project.assertions" >
- <enable project="org.apache.test" />
+ <enable package="org.apache.test" />
</assertions>
<assertions refid="project.assertions" />
No revision
No revision
1.10.2.3 +176 -578 ant/docs/manual/OptionalTasks/dotnet.html
Index: dotnet.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/dotnet.html,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -r1.10.2.2 -r1.10.2.3
--- dotnet.html 23 Sep 2003 13:07:10 -0000 1.10.2.2
+++ dotnet.html 27 Sep 2003 03:19:49 -0000 1.10.2.3
@@ -3,619 +3,202 @@
<title>.NET Tasks</title>
</head>
-<body>
<h1>.NET tasks</h1>
+<h2>Introduction</h2>
+
-
-
-<hr>
-<h2><CSC></h2>
-
-This task compiles CSharp source into executables or modules.
-
-This task compiles CSharp source into executables or modules. The task will
-only work on win2K/XP or other platforms with csc.exe or an equivalent.
-CSC must be on the execute path.
+Ant support for .NET goes back to before .NET was released, and
+continues to be expanded based on user demand. Users writing nothing but
+a .NET application, may want to look at the .NET-based
+<A href="http://nant.sourceforge.net/">NAnt</A> project, that supports
+both the Microsoft and the Ximian managed <A
+href="http://go-mono.com/">Mono</A> project's implementation of the
+.NET framework.
+<p>
+
+Over time, the .NET tasks in Ant have tended to evolve to meet a few
+limited needs. Firstly, developers working with complex deployment problems may
+want to use ant to use the fairly advanced deployment tasks Ant ships
+with. Secondly, anyone who has a cross-platform project can use these
+tasks to cover the .NET side of the problem. Here, cross-platform can
+mean more than just Java and .NET: the C++ tasks in the ant-contrib
+project on sourceforge can be used with Ant to do native C++ and .NET
+cross development if that is your need. Finally, Ant support for .NET
+lets one automate .NET development under an automated build process,
+such as AntHill or Cruise Control.
<p>
-All parameters are optional: <csc/> should suffice to produce a debug
-build of all *.cs files. References to external files do require explicit
-enumeration, so are one of the first attributes to consider adding. </p>
-<p>
+What this means is that the Ant tasks for .NET support do not get as
+much rigorous use as the Java tools, and are evolving more slowly -that
+includes the time for support calls to change. But as a consequence,
+developers working on .NET support have more freedom to play around with
+the code. It also means that the fairly unusual set of tasks supported
+by ant enable a few interesting operations that can not be performed any
+other way:
+<ol>
-The task is a directory based task, so attributes like
-<b>includes="**/*.cs"</b> and
-<b>excludes="broken.cs"</b> can be used to control
-the files pulled in. By default,
-all *.cs files from the project folder down are included in the command.
-When this happens the destFile -if not specified-
-is taken as the first file in the list, which may be somewhat hard to control.
-Specifying the output file with <b>'destfile'</b> seems prudent. </p>
-<p>
-Also, dependency checking only works if destfile is set.
+<li>Integrating with a Java based SOAP Service -generating C# code from
+the server's WSDL and running it against the server.
+</li>
+<li>Building and deploying a C#-based Web Service, then using the Apache
+Axis tasks to create JUnit tests to call the endpoints.
+
+<li>Patching .NET type libraries to work with more complex IDL than the
+basic <importtypelib> wrapper around tlbimport supports. Hence the
+disassembler and the reassembler.
+</li>
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example Values</b></td>
- </tr>
+</ol>
+Needless to say, possible does not mean easy.
+<A href="http://www.manning.com/hatcher/chap15.pdf">Chapter 15</A> of
+Java Development with Ant covers the first of these, using the Ant1.5
+version of the tasks. Going the other way -generating Java client
+code and JUnit testcases is covered in
+<A href="http://www.iseran.com/Steve/papers/interop/">The Wondrous curse
+of Interop</A>. The final trick, IDL and Typelib abuse, is not
+documented as we do not want to encourage such an ugly practice. It,
+can, however, be done if absolutely necessary. The trick is a sequence
+of <importtypelib/>, <ildasm>, <replace> and finally
+<ilasm>.
-<tr>
- <td valign="top">additionalModules</td>
- <td valign="top">Semicolon separated list of modules to refer to</td>
- </tr>
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-<tr>
- <td valign="top">definitions</td>
- <td valign="top">defined constants</td>
- <td valign="top"> "RELEASE;BETA1"</td>
- </tr>
-<tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">"true"(default)</td>
- </tr>
+<h2>Task List</h2>
+<table border="0" >
<tr>
- <td valign="top">destFile</td>
- <td valign="top">name of exe/library to create</td>
- <td valign="top">"example.exe"</td>
- </tr>
-<tr>
- <td valign="top">docFile</td>
- <td valign="top">name of file for documentation</td>
- <td valign="top">"doc.xml"</td>
- </tr>
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the CSharp task </td>
- <td>"/warnaserror+ /baseaddress:0x12840000"</td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-
- <tr>
- <td valign="top">fileAlign</td>
- <td valign="top">
- set the file alignment.
- Valid values are 0,512, 1024, 2048, 4096, 8192, and 16384
- 0 means 'leave to the compiler'
- </td>
- <td valign="top">512</td>
- </tr>
- <tr>
- <td valign="top">fullpaths</td>
- <td valign="top">print the full path of files on on errors</td>
- </tr>
-
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includeDefaultReferences</td>
- <td valign="top">Controls csc's /nostdlib argument,
- "true"(default) implies /nostdlib-.
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
+ <td><a href="csc.html">Csc</a></td>
+ <td>Compiles C# code</td>
+</tr>
<tr>
- <td valign="top">incremental</td>
- <td valign="top">Incremental build flag. Avoid till it works</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">mainClass</td>
- <td valign="top">name of main class for executables</td>
- <td valign="top">"com.example.project.entrypoint"</td>
- </tr>
-<tr>
- <td valign="top">noConfig</td>
- <td valign="top">a flag which tells the compiler not
- to read in the compiler settings files 'csc.rsp' in its
- bin directory and then the local directory</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optimize</td>
- <td valign="top">optimisation flag</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">references</td>
- <td valign="top">Semicolon separated list of dlls to refer to</td>
- <td valign="top">"mylib.dll;nunit.dll"</td>
- </tr>
-<tr>
- <td valign="top">referenceFiles </td>
- <td valign="top">Ant Path descriptioon of references to include.
- Wildcards should work. </td>
- <td valign="top"></td>
- </tr>
-
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top">"."</td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target</td>
- <td valign="top">"exe", "module", "winexe" or "library"</td>
- </tr>
+ <td><a href="vbc.html">vbc</a></td>
+ <td>Compiles VB.Net code</td>
+</tr>
+
<tr>
- <td valign="top">unsafe</td>
- <td valign="top">enable the <b>unsafe</b> keyword</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
+ <td><a href="jsharp.html">jsharp</a></td>
+ <td>Compiles J# files</td>
+</tr>
+
<tr>
- <td valign="top">utf8output</td>
- <td valign="top">require all compiler output to be in utf-8 format</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
+ <td><a href="ildasm.html">ildasm</a></td>
+ <td>Disassembles .NET executables and libraries</td>
+</tr>
+
<tr>
- <td valign="top">warnLevel</td>
- <td valign="top">level of warning currently between 1 and 4 with 4
- being the strictest. </td>
- <td valign="top">"1"-"4"</td>
- </tr>
+ <td><a href="ilasm.html">ilasm</a></td>
+ <td>Assembles .il files</td>
+</tr>
+
<tr>
- <td valign="top">win32Icon</td>
- <td valign="top">filename of icon to include</td>
- <td valign="top">"res/myicon.ico"</td>
- </tr>
+ <td><a href="wsdltodotnet.html">WsdlToDotnet</a></td>
+ <td>Generates .NET code (C# or VB) from a WSDL file</td>
+</tr>
+
<tr>
- <td valign="top">win32res</td>
- <td valign="top">filename of a win32 resource (.RES)file to include
- This is not a .NET resource, but it what windows is used to.</td>
- <td valign="top">"res/myapp.res"</td>
- </tr>
+ <td><a href="ImportTypelib.html">ImportTypelib</a></td>
+ <td>Imports a COM type library into .NET</td>
+</tr>
</table>
-<p>
-Example
-</p>
-<pre><csc
- optimize="true"
- debug="false"
- docFile="documentation.xml"
- warnLevel="4"
- unsafe="false"
- targetType="exe"
- incremental="false"
- definitions="RELEASE"
- excludes="src/unicode_class.cs"
- mainClass = "MainApp"
- destFile="NetApp.exe"
- />
-</pre>
-<hr>
-<h2><VBC></h2>
-
-This task compiles VisualBasic.NET source into executables or modules.
-This task compiles VisualBasic.NET source into executables or modules.
-The task will only work on win2K/XP or other platforms with vbc.exe
-or an equivalent. VBC must be on the execute path.
-<p>
-All parameters are optional: <vbc/> should suffice to produce a debug
-build of all *.vb files. References to external files do require explicit
-enumeration, so are one of the first attributes to consider adding. </p>
+<hr>
+<h2> Change Log </h2>
+<h4>Ant1.6</h4>
+This revision goes along with NET 1.1, though there is no reason why
+it should not work on other versions.
<p>
-The task is a directory based task, so attributes like
-<b>includes="**/*.vb"</b> and
-<b>excludes="broken.vb"</b> can be used to control
-the files pulled in. By default,
-all *.vb files from the project folder down are included in the command.
-When this happens the destFile -if not specified-
-is taken as the first file in the list, which may be somewhat hard to control.
-Specifying the output file with <b>'destfile'</b> seems prudent. </p>
-<p>
-Also, dependency checking only works if destfile is set.
+<ol>
+<li>vbc task</li>
+<li>jsharp task</li>
+<li>mono support</li>
+<li>ilasm</li>
+<li>tlbimport</li>
+<li>Reference filesets in the compiler tasks</li>
+<li>definitions in the compiler tasks</li>
+<li>multiple source filesets in the compiler tasks. If these are used, the
+implicit fileset is disabled</li>
+</ol>
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example Values</b></td>
- </tr>
+The compile tasks: vbc, jsharp, and csc, all contain lots of common code
+in a shared base class: if you can use one you should be able to use
+another.
-<tr>
- <td valign="top">additionalModules</td>
- <td valign="top">Semicolon separated list of modules to refer to</td>
- </tr>
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-<tr>
- <td valign="top">definitions</td>
- <td valign="top">defined constants</td>
- <td valign="top"> "RELEASE;BETA1"</td>
- </tr>
-<tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">"true"(default)</td>
- </tr>
+<h4>Ant 1.5</h4>
+This revision goes along with NET 1.0 (SP1)
+<ol>
+<li>CSC: added filealign</li>
+<li>CSC: added reference to office.dll</li>
+<li>CSC: dependency checking! only if destFile is set!
+<li>WsdlToDotnet written
+</ol>
-<tr>
- <td valign="top">destFile</td>
- <td valign="top">name of exe/library to create</td>
- <td valign="top">"example.exe"</td>
- </tr>
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the VisualBasicCompile task </td>
- <td>"/warnaserror+ /baseaddress:0x12840000"</td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
- <tr>
- <td valign="top">imports</td>
- <td valign="top">comma-separated list of global imports for namespaces
- in referenced metadata files.</td>
- </tr>
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
-<tr>
- <td valign="top">mainClass</td>
- <td valign="top">name of main class for executables</td>
- <td valign="top">"com.example.project.entrypoint"</td>
- </tr>
-<tr>
- <td valign="top">optimize</td>
- <td valign="top">optimisation flag</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionCompare</td>
- <td valign="top">Text or binary string comparisons.</td>
- <td valign="top">"text" or "binary"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionExplicit</td>
- <td valign="top">Require explicit declaration of variables?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionStrict</td>
- <td valign="top">Enforce strict language semantics?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">references</td>
- <td valign="top">Semicolon separated list of dlls to refer to</td>
- <td valign="top">"mylib.dll;nunit.dll"</td>
- </tr>
-<tr>
- <td valign="top">referenceFiles </td>
- <td valign="top">Ant Path descriptioon of references to include.
- Wildcards should work. </td>
- <td valign="top"></td>
- </tr>
-<tr>
- <td valign="top">removeIntChecks</td>
- <td valign="top">Remove integer checks?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">rootNamespace</td>
- <td valign="top">Root namespace for all type declarations.</td>
- <td valign="top">com.example</td>
- </tr>
-
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top">"."</td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target</td>
- <td valign="top">"exe", "module", "winexe" or "library"</td>
- </tr>
-<tr>
- <td valign="top">utf8output</td>
- <td valign="top">require all compiler output to be in utf-8 format</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">warnLevel</td>
- <td valign="top">level of warning currently between 1 and 4 with 4
- being the strictest. </td>
- <td valign="top">"1"-"4"</td>
- </tr>
-<tr>
- <td valign="top">win32Icon</td>
- <td valign="top">filename of icon to include</td>
- <td valign="top">"res/myicon.ico"</td>
- </tr>
-<tr>
- <td valign="top">win32res</td>
- <td valign="top">filename of a win32 resource (.RES)file to include
- This is not a .NET resource, but it what windows is used to.</td>
- <td valign="top">"res/myapp.res"</td>
- </tr>
+<h4>Version 0.4</h4>
+This is the beta-2 revision of the tasks.
+<ol>
+<li>ILASM: pulled the owner attribute, added keyfile for giving binaries a strong name
+(MD5 hash of the checksum)</li>
+<li>CSC: added win32res , noConfig, utf8output, fullpaths</li>
+<li>CSC: </li>
+</ol>
+
+<h4>Version 0.3</h4>
-</table>
-<p>
-Example
-</p>
-<pre><vbc
- optimize="true"
- debug="false"
- warnLevel="4"
- targetType="exe"
- definitions="RELEASE"
- excludes="src/unicode_class.vb"
- mainClass = "MainApp"
- destFile="NetApp.exe"
- optionExplicit="true"
- optionCompare="text"
- />
-</pre>
-<hr>
-<h2><ilasm></h2>
-<p>Task to assemble .net 'Intermediate Language' files.
-The task will only work on windows until other platforms support csc.exe or
-an equivalent. ilasm.exe must be on the execute path too.
-</p>
+The changes here reflect Beta-1 of the dotnet SDK and experience of use in
+more complex projects. This build does not work with the older SDK,
+primarily because the automatic reference feature references libraries
+only found in the new SDK version.
<p>
-All parameters are optional: <il/> should suffice to produce a debug
-build of all *.il files.
-The option set is roughly compatible with the CSharp class;
-even though the command line options are only vaguely
-equivalent. [The low level commands take things like /OUT=file,
-csc wants /out:file ... /verbose is used some places; /quiet here in
-ildasm... etc.] It would be nice if someone made all the command line
-tools consistent (and not as brittle as the java cmdline tools)
-</p>
+External changes</p>
+<ul>
+<li>Recursive inclusion of .cs and .il files</li>
-<p>
+<li>Documentation enhanced, includes examples and details of all parameters</li>
-The task is a directory based task, so attributes like <b>includes="*.il"</b> and
-<b>excludes="broken.il"</b> can be used to control the files pulled in.
-Each file is built on its own, producing an appropriately named output file unless
-manually specified with <b>outfile</b>
-</p>
-
-
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example</b></td>
- </tr>
-
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- ("yes"/"no"). Default excludes are used when omitted.</td>
- </tr>
-
- <tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">true (default)</td>
- </tr>
-
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the ilasm task, primarily because they
- arent really documented: use ilasm /? to see them</td>
- <td></td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">fullpaths</td>
- <td valign="top">Should error text provide the full path to files</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
- <tr>
- <td valign="top">keyfile</td>
- <td valign="top">the name of a file containing a private key, with which
- the assembly output is checksumed and then MD5 signed
- to have a <i>strong name</i></td>
- </tr>
-<tr>
- <td valign="top">listing</td>
- <td valign="top">Produce a listing (off by default). Listings go to the
- current output stream</td>
- <td valign="top">"on", "off" (default)</td>
- </tr>
-<tr>
- <td valign="top">outputFile</td>
- <td valign="top">filename of output</td>
- <td valign="top">"example.exe"</td>
- </tr>
-<tr>
- <td valign="top">resourceFile</td>
- <td valign="top">name of resource file to include</td>
- <td valign="top">"resources.res"</td>
- </tr>
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top"></td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target. library means DLL is output. </td>
- <td valign="top">"exe"(default), "library"</td>
- </tr>
-<tr>
- <td valign="top">verbose</td>
- <td valign="top">output progress messages</td>
- <td valign="top">"on", "off" (default)</td>
- </tr>
+<li>The csc task automatically includes the common dotnet assemblies, so
+there is no need to remember to refer to 'System.dll', 'System.Web.Services',
+ etc. This feature can be disabled by setting the 'includeDefaultReferences'
+ flag to false. </li>
-</table>
-<p>
-Example</p>
-<pre><ilasm
- outputFile="app.exe"
- verbose="on"
- listing="on"
- owner="secret"
- />
-</pre>
-<h2><WsdlToDotnet></h2>
-Why add a wrapper to the MS WSDL tool?
-So that you can verify that your web services, be they written with Axis or
-anyone else's SOAP toolkit, work with .NET clients.
-<p>
-This task is dependency aware when using a file as a source and destination;
-so if you <get> the file (with <code>usetimestamp="true"</code>) then
-you only rebuild stuff when the WSDL file is changed. Of course,
-if the server generates a new timestamp every time you ask for the WSDL,
-this is not enough...use the <filesmatch> <condition> to
-to byte for byte comparison against a cached WSDL file then make
-the target conditional on that test failing.
-
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example</b></td>
- </tr>
- <tr>
- <td valign="top">destFile</td>
- <td valign="top">name of file to generate. Required</td>
- <td valign="top">ApacheNet.cs</td>
- </tr>
- <tr>
- <td valign="top">srcFile</td>
- <td valign="top">name of WSDL file to use.
- Required if url is not set</td>
- <td valign="top">service.wsdl</td>
- </tr>
- <tr>
- <td valign="top">url</td>
- <td valign="top">url to retrive WSDL from.
- required if srcFile is unset</td>
- <td valign="top">http://localhost/service?wsdl</td>
- </tr>
- <tr>
- <td valign="top">server</td>
- <td valign="top">generate server stubs, not client proxy code.
- optional; default false</td>
- <td valign="top">"false"(default)</td>
- </tr>
- <tr>
- <td valign="top">namespace</td>
- <td valign="top">namespace to place the source in.
- optional; default ""</td>
- <td valign="top">Apache.Net</td>
- </tr>
- <tr>
- <td valign="top">language</td>
- <td valign="top">language; one of "CS", "JS", or "VB"
- optional; </td>
- <td valign="top"> "CS" (default)</td>
- </tr>
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should failure halt the build?</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the task, like all the proxy server config stuff</td>
- <td></td>
- </tr>
-
- </table>
-<hr>
+ <li> References can also be referred to using the ReferenceFiles parameter, which
+is an ant path specification. The old 'references' string is still retained.</li>
+<li> An 'extraoptions' attribute enables the build file to include any CSC options
+which are not explicitly supported in the CSC task. </li>
+</ul>
-<hr>
+Internal changes
+<ul>
+<li>Some minor refactoring (move common code a method)</li>
+<li>Application of Jedits JavaStyle task resulted in a major reshaping of
+the codebase and the insertion of a blank line every second line. Significant
+effort was required to revert some (but not all) changes.</li>
+<li>Removed throws clause from methods which can't throw exception<hr>
<h2> Change Log </h2>
+<h4>Ant1.6</h4>
+This revision goes along with NET 1.1, though there is no reason why
+it should not work on other versions.
+<p>
+
+<ol>
+<li>vbc task</li>
+<li>jsharp task</li>
+<li>mono support</li>
+<li>ilasm</li>
+<li>tlbimport</li>
+<li>Reference filesets in the compiler tasks</li>
+<li>definitions in the compiler tasks</li>
+<li>multiple source filesets in the compiler tasks. If these are used, the
+implicit fileset is disabled</li>
+</ol>
+
+The compile tasks: vbc, jsharp, and csc, all contain lots of common code
+in a shared base class: if you can use one you should be able to use
+another.
+
<h4>Version 0.5</h4>
This revision goes along with NET 1.0 (SP1)
<ol>
@@ -665,6 +248,21 @@
the codebase and the insertion of a blank line every second line. Significant
effort was required to revert some (but not all) changes.</li>
<li>Removed throws clause from methods which can't throw exceptions </li>
+</ul>
+
+The test harness has been expanded to include unicode source file
+(the build works but the rest of the system has 'issues' with high unicode
+package and method names)
+
+<h4>Version 0.2</h4>
+First public edition, added to the ant cvs tree. Tested on the PDC build of
+the dotnet SDK only, and still immature. The command execution code was
+refactored out into a 'NetCommand' class for re-use. The Ilasm task was added
+at this time.
+
+<h4>Version 0.1</h4>
+Initial proof of concept; very rudimentary support for CSC only.
+s </li>
</ul>
The test harness has been expanded to include unicode source file
No revision
Index: dotnet.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/dotnet.html,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -r1.10.2.2 -r1.10.2.3
--- dotnet.html 23 Sep 2003 13:07:10 -0000 1.10.2.2
+++ dotnet.html 27 Sep 2003 03:19:49 -0000 1.10.2.3
@@ -3,619 +3,202 @@
<title>.NET Tasks</title>
</head>
-<body>
<h1>.NET tasks</h1>
+<h2>Introduction</h2>
+
-
-
-<hr>
-<h2><CSC></h2>
-
-This task compiles CSharp source into executables or modules.
-
-This task compiles CSharp source into executables or modules. The task will
-only work on win2K/XP or other platforms with csc.exe or an equivalent.
-CSC must be on the execute path.
+Ant support for .NET goes back to before .NET was released, and
+continues to be expanded based on user demand. Users writing nothing but
+a .NET application, may want to look at the .NET-based
+<A href="http://nant.sourceforge.net/">NAnt</A> project, that supports
+both the Microsoft and the Ximian managed <A
+href="http://go-mono.com/">Mono</A> project's implementation of the
+.NET framework.
+<p>
+
+Over time, the .NET tasks in Ant have tended to evolve to meet a few
+limited needs. Firstly, developers working with complex deployment problems may
+want to use ant to use the fairly advanced deployment tasks Ant ships
+with. Secondly, anyone who has a cross-platform project can use these
+tasks to cover the .NET side of the problem. Here, cross-platform can
+mean more than just Java and .NET: the C++ tasks in the ant-contrib
+project on sourceforge can be used with Ant to do native C++ and .NET
+cross development if that is your need. Finally, Ant support for .NET
+lets one automate .NET development under an automated build process,
+such as AntHill or Cruise Control.
<p>
-All parameters are optional: <csc/> should suffice to produce a debug
-build of all *.cs files. References to external files do require explicit
-enumeration, so are one of the first attributes to consider adding. </p>
-<p>
+What this means is that the Ant tasks for .NET support do not get as
+much rigorous use as the Java tools, and are evolving more slowly -that
+includes the time for support calls to change. But as a consequence,
+developers working on .NET support have more freedom to play around with
+the code. It also means that the fairly unusual set of tasks supported
+by ant enable a few interesting operations that can not be performed any
+other way:
+<ol>
-The task is a directory based task, so attributes like
-<b>includes="**/*.cs"</b> and
-<b>excludes="broken.cs"</b> can be used to control
-the files pulled in. By default,
-all *.cs files from the project folder down are included in the command.
-When this happens the destFile -if not specified-
-is taken as the first file in the list, which may be somewhat hard to control.
-Specifying the output file with <b>'destfile'</b> seems prudent. </p>
-<p>
-Also, dependency checking only works if destfile is set.
+<li>Integrating with a Java based SOAP Service -generating C# code from
+the server's WSDL and running it against the server.
+</li>
+<li>Building and deploying a C#-based Web Service, then using the Apache
+Axis tasks to create JUnit tests to call the endpoints.
+
+<li>Patching .NET type libraries to work with more complex IDL than the
+basic <importtypelib> wrapper around tlbimport supports. Hence the
+disassembler and the reassembler.
+</li>
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example Values</b></td>
- </tr>
+</ol>
+Needless to say, possible does not mean easy.
+<A href="http://www.manning.com/hatcher/chap15.pdf">Chapter 15</A> of
+Java Development with Ant covers the first of these, using the Ant1.5
+version of the tasks. Going the other way -generating Java client
+code and JUnit testcases is covered in
+<A href="http://www.iseran.com/Steve/papers/interop/">The Wondrous curse
+of Interop</A>. The final trick, IDL and Typelib abuse, is not
+documented as we do not want to encourage such an ugly practice. It,
+can, however, be done if absolutely necessary. The trick is a sequence
+of <importtypelib/>, <ildasm>, <replace> and finally
+<ilasm>.
-<tr>
- <td valign="top">additionalModules</td>
- <td valign="top">Semicolon separated list of modules to refer to</td>
- </tr>
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-<tr>
- <td valign="top">definitions</td>
- <td valign="top">defined constants</td>
- <td valign="top"> "RELEASE;BETA1"</td>
- </tr>
-<tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">"true"(default)</td>
- </tr>
+<h2>Task List</h2>
+<table border="0" >
<tr>
- <td valign="top">destFile</td>
- <td valign="top">name of exe/library to create</td>
- <td valign="top">"example.exe"</td>
- </tr>
-<tr>
- <td valign="top">docFile</td>
- <td valign="top">name of file for documentation</td>
- <td valign="top">"doc.xml"</td>
- </tr>
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the CSharp task </td>
- <td>"/warnaserror+ /baseaddress:0x12840000"</td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-
- <tr>
- <td valign="top">fileAlign</td>
- <td valign="top">
- set the file alignment.
- Valid values are 0,512, 1024, 2048, 4096, 8192, and 16384
- 0 means 'leave to the compiler'
- </td>
- <td valign="top">512</td>
- </tr>
- <tr>
- <td valign="top">fullpaths</td>
- <td valign="top">print the full path of files on on errors</td>
- </tr>
-
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includeDefaultReferences</td>
- <td valign="top">Controls csc's /nostdlib argument,
- "true"(default) implies /nostdlib-.
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
+ <td><a href="csc.html">Csc</a></td>
+ <td>Compiles C# code</td>
+</tr>
<tr>
- <td valign="top">incremental</td>
- <td valign="top">Incremental build flag. Avoid till it works</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">mainClass</td>
- <td valign="top">name of main class for executables</td>
- <td valign="top">"com.example.project.entrypoint"</td>
- </tr>
-<tr>
- <td valign="top">noConfig</td>
- <td valign="top">a flag which tells the compiler not
- to read in the compiler settings files 'csc.rsp' in its
- bin directory and then the local directory</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optimize</td>
- <td valign="top">optimisation flag</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">references</td>
- <td valign="top">Semicolon separated list of dlls to refer to</td>
- <td valign="top">"mylib.dll;nunit.dll"</td>
- </tr>
-<tr>
- <td valign="top">referenceFiles </td>
- <td valign="top">Ant Path descriptioon of references to include.
- Wildcards should work. </td>
- <td valign="top"></td>
- </tr>
-
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top">"."</td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target</td>
- <td valign="top">"exe", "module", "winexe" or "library"</td>
- </tr>
+ <td><a href="vbc.html">vbc</a></td>
+ <td>Compiles VB.Net code</td>
+</tr>
+
<tr>
- <td valign="top">unsafe</td>
- <td valign="top">enable the <b>unsafe</b> keyword</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
+ <td><a href="jsharp.html">jsharp</a></td>
+ <td>Compiles J# files</td>
+</tr>
+
<tr>
- <td valign="top">utf8output</td>
- <td valign="top">require all compiler output to be in utf-8 format</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
+ <td><a href="ildasm.html">ildasm</a></td>
+ <td>Disassembles .NET executables and libraries</td>
+</tr>
+
<tr>
- <td valign="top">warnLevel</td>
- <td valign="top">level of warning currently between 1 and 4 with 4
- being the strictest. </td>
- <td valign="top">"1"-"4"</td>
- </tr>
+ <td><a href="ilasm.html">ilasm</a></td>
+ <td>Assembles .il files</td>
+</tr>
+
<tr>
- <td valign="top">win32Icon</td>
- <td valign="top">filename of icon to include</td>
- <td valign="top">"res/myicon.ico"</td>
- </tr>
+ <td><a href="wsdltodotnet.html">WsdlToDotnet</a></td>
+ <td>Generates .NET code (C# or VB) from a WSDL file</td>
+</tr>
+
<tr>
- <td valign="top">win32res</td>
- <td valign="top">filename of a win32 resource (.RES)file to include
- This is not a .NET resource, but it what windows is used to.</td>
- <td valign="top">"res/myapp.res"</td>
- </tr>
+ <td><a href="ImportTypelib.html">ImportTypelib</a></td>
+ <td>Imports a COM type library into .NET</td>
+</tr>
</table>
-<p>
-Example
-</p>
-<pre><csc
- optimize="true"
- debug="false"
- docFile="documentation.xml"
- warnLevel="4"
- unsafe="false"
- targetType="exe"
- incremental="false"
- definitions="RELEASE"
- excludes="src/unicode_class.cs"
- mainClass = "MainApp"
- destFile="NetApp.exe"
- />
-</pre>
-<hr>
-<h2><VBC></h2>
-
-This task compiles VisualBasic.NET source into executables or modules.
-This task compiles VisualBasic.NET source into executables or modules.
-The task will only work on win2K/XP or other platforms with vbc.exe
-or an equivalent. VBC must be on the execute path.
-<p>
-All parameters are optional: <vbc/> should suffice to produce a debug
-build of all *.vb files. References to external files do require explicit
-enumeration, so are one of the first attributes to consider adding. </p>
+<hr>
+<h2> Change Log </h2>
+<h4>Ant1.6</h4>
+This revision goes along with NET 1.1, though there is no reason why
+it should not work on other versions.
<p>
-The task is a directory based task, so attributes like
-<b>includes="**/*.vb"</b> and
-<b>excludes="broken.vb"</b> can be used to control
-the files pulled in. By default,
-all *.vb files from the project folder down are included in the command.
-When this happens the destFile -if not specified-
-is taken as the first file in the list, which may be somewhat hard to control.
-Specifying the output file with <b>'destfile'</b> seems prudent. </p>
-<p>
-Also, dependency checking only works if destfile is set.
+<ol>
+<li>vbc task</li>
+<li>jsharp task</li>
+<li>mono support</li>
+<li>ilasm</li>
+<li>tlbimport</li>
+<li>Reference filesets in the compiler tasks</li>
+<li>definitions in the compiler tasks</li>
+<li>multiple source filesets in the compiler tasks. If these are used, the
+implicit fileset is disabled</li>
+</ol>
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example Values</b></td>
- </tr>
+The compile tasks: vbc, jsharp, and csc, all contain lots of common code
+in a shared base class: if you can use one you should be able to use
+another.
-<tr>
- <td valign="top">additionalModules</td>
- <td valign="top">Semicolon separated list of modules to refer to</td>
- </tr>
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-<tr>
- <td valign="top">definitions</td>
- <td valign="top">defined constants</td>
- <td valign="top"> "RELEASE;BETA1"</td>
- </tr>
-<tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">"true"(default)</td>
- </tr>
+<h4>Ant 1.5</h4>
+This revision goes along with NET 1.0 (SP1)
+<ol>
+<li>CSC: added filealign</li>
+<li>CSC: added reference to office.dll</li>
+<li>CSC: dependency checking! only if destFile is set!
+<li>WsdlToDotnet written
+</ol>
-<tr>
- <td valign="top">destFile</td>
- <td valign="top">name of exe/library to create</td>
- <td valign="top">"example.exe"</td>
- </tr>
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the VisualBasicCompile task </td>
- <td>"/warnaserror+ /baseaddress:0x12840000"</td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
- <tr>
- <td valign="top">imports</td>
- <td valign="top">comma-separated list of global imports for namespaces
- in referenced metadata files.</td>
- </tr>
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
-<tr>
- <td valign="top">mainClass</td>
- <td valign="top">name of main class for executables</td>
- <td valign="top">"com.example.project.entrypoint"</td>
- </tr>
-<tr>
- <td valign="top">optimize</td>
- <td valign="top">optimisation flag</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionCompare</td>
- <td valign="top">Text or binary string comparisons.</td>
- <td valign="top">"text" or "binary"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionExplicit</td>
- <td valign="top">Require explicit declaration of variables?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionStrict</td>
- <td valign="top">Enforce strict language semantics?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">references</td>
- <td valign="top">Semicolon separated list of dlls to refer to</td>
- <td valign="top">"mylib.dll;nunit.dll"</td>
- </tr>
-<tr>
- <td valign="top">referenceFiles </td>
- <td valign="top">Ant Path descriptioon of references to include.
- Wildcards should work. </td>
- <td valign="top"></td>
- </tr>
-<tr>
- <td valign="top">removeIntChecks</td>
- <td valign="top">Remove integer checks?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">rootNamespace</td>
- <td valign="top">Root namespace for all type declarations.</td>
- <td valign="top">com.example</td>
- </tr>
-
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top">"."</td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target</td>
- <td valign="top">"exe", "module", "winexe" or "library"</td>
- </tr>
-<tr>
- <td valign="top">utf8output</td>
- <td valign="top">require all compiler output to be in utf-8 format</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">warnLevel</td>
- <td valign="top">level of warning currently between 1 and 4 with 4
- being the strictest. </td>
- <td valign="top">"1"-"4"</td>
- </tr>
-<tr>
- <td valign="top">win32Icon</td>
- <td valign="top">filename of icon to include</td>
- <td valign="top">"res/myicon.ico"</td>
- </tr>
-<tr>
- <td valign="top">win32res</td>
- <td valign="top">filename of a win32 resource (.RES)file to include
- This is not a .NET resource, but it what windows is used to.</td>
- <td valign="top">"res/myapp.res"</td>
- </tr>
+<h4>Version 0.4</h4>
+This is the beta-2 revision of the tasks.
+<ol>
+<li>ILASM: pulled the owner attribute, added keyfile for giving binaries a strong name
+(MD5 hash of the checksum)</li>
+<li>CSC: added win32res , noConfig, utf8output, fullpaths</li>
+<li>CSC: </li>
+</ol>
+
+<h4>Version 0.3</h4>
-</table>
-<p>
-Example
-</p>
-<pre><vbc
- optimize="true"
- debug="false"
- warnLevel="4"
- targetType="exe"
- definitions="RELEASE"
- excludes="src/unicode_class.vb"
- mainClass = "MainApp"
- destFile="NetApp.exe"
- optionExplicit="true"
- optionCompare="text"
- />
-</pre>
-<hr>
-<h2><ilasm></h2>
-<p>Task to assemble .net 'Intermediate Language' files.
-The task will only work on windows until other platforms support csc.exe or
-an equivalent. ilasm.exe must be on the execute path too.
-</p>
+The changes here reflect Beta-1 of the dotnet SDK and experience of use in
+more complex projects. This build does not work with the older SDK,
+primarily because the automatic reference feature references libraries
+only found in the new SDK version.
<p>
-All parameters are optional: <il/> should suffice to produce a debug
-build of all *.il files.
-The option set is roughly compatible with the CSharp class;
-even though the command line options are only vaguely
-equivalent. [The low level commands take things like /OUT=file,
-csc wants /out:file ... /verbose is used some places; /quiet here in
-ildasm... etc.] It would be nice if someone made all the command line
-tools consistent (and not as brittle as the java cmdline tools)
-</p>
+External changes</p>
+<ul>
+<li>Recursive inclusion of .cs and .il files</li>
-<p>
+<li>Documentation enhanced, includes examples and details of all parameters</li>
-The task is a directory based task, so attributes like <b>includes="*.il"</b> and
-<b>excludes="broken.il"</b> can be used to control the files pulled in.
-Each file is built on its own, producing an appropriately named output file unless
-manually specified with <b>outfile</b>
-</p>
-
-
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example</b></td>
- </tr>
-
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- ("yes"/"no"). Default excludes are used when omitted.</td>
- </tr>
-
- <tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">true (default)</td>
- </tr>
-
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the ilasm task, primarily because they
- arent really documented: use ilasm /? to see them</td>
- <td></td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">fullpaths</td>
- <td valign="top">Should error text provide the full path to files</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
- <tr>
- <td valign="top">keyfile</td>
- <td valign="top">the name of a file containing a private key, with which
- the assembly output is checksumed and then MD5 signed
- to have a <i>strong name</i></td>
- </tr>
-<tr>
- <td valign="top">listing</td>
- <td valign="top">Produce a listing (off by default). Listings go to the
- current output stream</td>
- <td valign="top">"on", "off" (default)</td>
- </tr>
-<tr>
- <td valign="top">outputFile</td>
- <td valign="top">filename of output</td>
- <td valign="top">"example.exe"</td>
- </tr>
-<tr>
- <td valign="top">resourceFile</td>
- <td valign="top">name of resource file to include</td>
- <td valign="top">"resources.res"</td>
- </tr>
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top"></td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target. library means DLL is output. </td>
- <td valign="top">"exe"(default), "library"</td>
- </tr>
-<tr>
- <td valign="top">verbose</td>
- <td valign="top">output progress messages</td>
- <td valign="top">"on", "off" (default)</td>
- </tr>
+<li>The csc task automatically includes the common dotnet assemblies, so
+there is no need to remember to refer to 'System.dll', 'System.Web.Services',
+ etc. This feature can be disabled by setting the 'includeDefaultReferences'
+ flag to false. </li>
-</table>
-<p>
-Example</p>
-<pre><ilasm
- outputFile="app.exe"
- verbose="on"
- listing="on"
- owner="secret"
- />
-</pre>
-<h2><WsdlToDotnet></h2>
-Why add a wrapper to the MS WSDL tool?
-So that you can verify that your web services, be they written with Axis or
-anyone else's SOAP toolkit, work with .NET clients.
-<p>
-This task is dependency aware when using a file as a source and destination;
-so if you <get> the file (with <code>usetimestamp="true"</code>) then
-you only rebuild stuff when the WSDL file is changed. Of course,
-if the server generates a new timestamp every time you ask for the WSDL,
-this is not enough...use the <filesmatch> <condition> to
-to byte for byte comparison against a cached WSDL file then make
-the target conditional on that test failing.
-
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example</b></td>
- </tr>
- <tr>
- <td valign="top">destFile</td>
- <td valign="top">name of file to generate. Required</td>
- <td valign="top">ApacheNet.cs</td>
- </tr>
- <tr>
- <td valign="top">srcFile</td>
- <td valign="top">name of WSDL file to use.
- Required if url is not set</td>
- <td valign="top">service.wsdl</td>
- </tr>
- <tr>
- <td valign="top">url</td>
- <td valign="top">url to retrive WSDL from.
- required if srcFile is unset</td>
- <td valign="top">http://localhost/service?wsdl</td>
- </tr>
- <tr>
- <td valign="top">server</td>
- <td valign="top">generate server stubs, not client proxy code.
- optional; default false</td>
- <td valign="top">"false"(default)</td>
- </tr>
- <tr>
- <td valign="top">namespace</td>
- <td valign="top">namespace to place the source in.
- optional; default ""</td>
- <td valign="top">Apache.Net</td>
- </tr>
- <tr>
- <td valign="top">language</td>
- <td valign="top">language; one of "CS", "JS", or "VB"
- optional; </td>
- <td valign="top"> "CS" (default)</td>
- </tr>
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should failure halt the build?</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the task, like all the proxy server config stuff</td>
- <td></td>
- </tr>
-
- </table>
-<hr>
+ <li> References can also be referred to using the ReferenceFiles parameter, which
+is an ant path specification. The old 'references' string is still retained.</li>
+<li> An 'extraoptions' attribute enables the build file to include any CSC options
+which are not explicitly supported in the CSC task. </li>
+</ul>
-<hr>
+Internal changes
+<ul>
+<li>Some minor refactoring (move common code a method)</li>
+<li>Application of Jedits JavaStyle task resulted in a major reshaping of
+the codebase and the insertion of a blank line every second line. Significant
+effort was required to revert some (but not all) changes.</li>
+<li>Removed throws clause from methods which can't throw exception<hr>
<h2> Change Log </h2>
+<h4>Ant1.6</h4>
+This revision goes along with NET 1.1, though there is no reason why
+it should not work on other versions.
+<p>
+
+<ol>
+<li>vbc task</li>
+<li>jsharp task</li>
+<li>mono support</li>
+<li>ilasm</li>
+<li>tlbimport</li>
+<li>Reference filesets in the compiler tasks</li>
+<li>definitions in the compiler tasks</li>
+<li>multiple source filesets in the compiler tasks. If these are used, the
+implicit fileset is disabled</li>
+</ol>
+
+The compile tasks: vbc, jsharp, and csc, all contain lots of common code
+in a shared base class: if you can use one you should be able to use
+another.
+
<h4>Version 0.5</h4>
This revision goes along with NET 1.0 (SP1)
<ol>
@@ -665,6 +248,21 @@
the codebase and the insertion of a blank line every second line. Significant
effort was required to revert some (but not all) changes.</li>
<li>Removed throws clause from methods which can't throw exceptions </li>
+</ul>
+
+The test harness has been expanded to include unicode source file
+(the build works but the rest of the system has 'issues' with high unicode
+package and method names)
+
+<h4>Version 0.2</h4>
+First public edition, added to the ant cvs tree. Tested on the PDC build of
+the dotnet SDK only, and still immature. The command execution code was
+refactored out into a 'NetCommand' class for re-use. The Ilasm task was added
+at this time.
+
+<h4>Version 0.1</h4>
+Initial proof of concept; very rudimentary support for CSC only.
+s </li>
</ul>
The test harness has been expanded to include unicode source file
No revision
Index: dotnet.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/dotnet.html,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -r1.10.2.2 -r1.10.2.3
--- dotnet.html 23 Sep 2003 13:07:10 -0000 1.10.2.2
+++ dotnet.html 27 Sep 2003 03:19:49 -0000 1.10.2.3
@@ -3,619 +3,202 @@
<title>.NET Tasks</title>
</head>
-<body>
<h1>.NET tasks</h1>
+<h2>Introduction</h2>
+
-
-
-<hr>
-<h2><CSC></h2>
-
-This task compiles CSharp source into executables or modules.
-
-This task compiles CSharp source into executables or modules. The task will
-only work on win2K/XP or other platforms with csc.exe or an equivalent.
-CSC must be on the execute path.
+Ant support for .NET goes back to before .NET was released, and
+continues to be expanded based on user demand. Users writing nothing but
+a .NET application, may want to look at the .NET-based
+<A href="http://nant.sourceforge.net/">NAnt</A> project, that supports
+both the Microsoft and the Ximian managed <A
+href="http://go-mono.com/">Mono</A> project's implementation of the
+.NET framework.
+<p>
+
+Over time, the .NET tasks in Ant have tended to evolve to meet a few
+limited needs. Firstly, developers working with complex deployment problems may
+want to use ant to use the fairly advanced deployment tasks Ant ships
+with. Secondly, anyone who has a cross-platform project can use these
+tasks to cover the .NET side of the problem. Here, cross-platform can
+mean more than just Java and .NET: the C++ tasks in the ant-contrib
+project on sourceforge can be used with Ant to do native C++ and .NET
+cross development if that is your need. Finally, Ant support for .NET
+lets one automate .NET development under an automated build process,
+such as AntHill or Cruise Control.
<p>
-All parameters are optional: <csc/> should suffice to produce a debug
-build of all *.cs files. References to external files do require explicit
-enumeration, so are one of the first attributes to consider adding. </p>
-<p>
+What this means is that the Ant tasks for .NET support do not get as
+much rigorous use as the Java tools, and are evolving more slowly -that
+includes the time for support calls to change. But as a consequence,
+developers working on .NET support have more freedom to play around with
+the code. It also means that the fairly unusual set of tasks supported
+by ant enable a few interesting operations that can not be performed any
+other way:
+<ol>
-The task is a directory based task, so attributes like
-<b>includes="**/*.cs"</b> and
-<b>excludes="broken.cs"</b> can be used to control
-the files pulled in. By default,
-all *.cs files from the project folder down are included in the command.
-When this happens the destFile -if not specified-
-is taken as the first file in the list, which may be somewhat hard to control.
-Specifying the output file with <b>'destfile'</b> seems prudent. </p>
-<p>
-Also, dependency checking only works if destfile is set.
+<li>Integrating with a Java based SOAP Service -generating C# code from
+the server's WSDL and running it against the server.
+</li>
+<li>Building and deploying a C#-based Web Service, then using the Apache
+Axis tasks to create JUnit tests to call the endpoints.
+
+<li>Patching .NET type libraries to work with more complex IDL than the
+basic <importtypelib> wrapper around tlbimport supports. Hence the
+disassembler and the reassembler.
+</li>
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example Values</b></td>
- </tr>
+</ol>
+Needless to say, possible does not mean easy.
+<A href="http://www.manning.com/hatcher/chap15.pdf">Chapter 15</A> of
+Java Development with Ant covers the first of these, using the Ant1.5
+version of the tasks. Going the other way -generating Java client
+code and JUnit testcases is covered in
+<A href="http://www.iseran.com/Steve/papers/interop/">The Wondrous curse
+of Interop</A>. The final trick, IDL and Typelib abuse, is not
+documented as we do not want to encourage such an ugly practice. It,
+can, however, be done if absolutely necessary. The trick is a sequence
+of <importtypelib/>, <ildasm>, <replace> and finally
+<ilasm>.
-<tr>
- <td valign="top">additionalModules</td>
- <td valign="top">Semicolon separated list of modules to refer to</td>
- </tr>
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-<tr>
- <td valign="top">definitions</td>
- <td valign="top">defined constants</td>
- <td valign="top"> "RELEASE;BETA1"</td>
- </tr>
-<tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">"true"(default)</td>
- </tr>
+<h2>Task List</h2>
+<table border="0" >
<tr>
- <td valign="top">destFile</td>
- <td valign="top">name of exe/library to create</td>
- <td valign="top">"example.exe"</td>
- </tr>
-<tr>
- <td valign="top">docFile</td>
- <td valign="top">name of file for documentation</td>
- <td valign="top">"doc.xml"</td>
- </tr>
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the CSharp task </td>
- <td>"/warnaserror+ /baseaddress:0x12840000"</td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-
- <tr>
- <td valign="top">fileAlign</td>
- <td valign="top">
- set the file alignment.
- Valid values are 0,512, 1024, 2048, 4096, 8192, and 16384
- 0 means 'leave to the compiler'
- </td>
- <td valign="top">512</td>
- </tr>
- <tr>
- <td valign="top">fullpaths</td>
- <td valign="top">print the full path of files on on errors</td>
- </tr>
-
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includeDefaultReferences</td>
- <td valign="top">Controls csc's /nostdlib argument,
- "true"(default) implies /nostdlib-.
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
+ <td><a href="csc.html">Csc</a></td>
+ <td>Compiles C# code</td>
+</tr>
<tr>
- <td valign="top">incremental</td>
- <td valign="top">Incremental build flag. Avoid till it works</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">mainClass</td>
- <td valign="top">name of main class for executables</td>
- <td valign="top">"com.example.project.entrypoint"</td>
- </tr>
-<tr>
- <td valign="top">noConfig</td>
- <td valign="top">a flag which tells the compiler not
- to read in the compiler settings files 'csc.rsp' in its
- bin directory and then the local directory</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optimize</td>
- <td valign="top">optimisation flag</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">references</td>
- <td valign="top">Semicolon separated list of dlls to refer to</td>
- <td valign="top">"mylib.dll;nunit.dll"</td>
- </tr>
-<tr>
- <td valign="top">referenceFiles </td>
- <td valign="top">Ant Path descriptioon of references to include.
- Wildcards should work. </td>
- <td valign="top"></td>
- </tr>
-
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top">"."</td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target</td>
- <td valign="top">"exe", "module", "winexe" or "library"</td>
- </tr>
+ <td><a href="vbc.html">vbc</a></td>
+ <td>Compiles VB.Net code</td>
+</tr>
+
<tr>
- <td valign="top">unsafe</td>
- <td valign="top">enable the <b>unsafe</b> keyword</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
+ <td><a href="jsharp.html">jsharp</a></td>
+ <td>Compiles J# files</td>
+</tr>
+
<tr>
- <td valign="top">utf8output</td>
- <td valign="top">require all compiler output to be in utf-8 format</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
+ <td><a href="ildasm.html">ildasm</a></td>
+ <td>Disassembles .NET executables and libraries</td>
+</tr>
+
<tr>
- <td valign="top">warnLevel</td>
- <td valign="top">level of warning currently between 1 and 4 with 4
- being the strictest. </td>
- <td valign="top">"1"-"4"</td>
- </tr>
+ <td><a href="ilasm.html">ilasm</a></td>
+ <td>Assembles .il files</td>
+</tr>
+
<tr>
- <td valign="top">win32Icon</td>
- <td valign="top">filename of icon to include</td>
- <td valign="top">"res/myicon.ico"</td>
- </tr>
+ <td><a href="wsdltodotnet.html">WsdlToDotnet</a></td>
+ <td>Generates .NET code (C# or VB) from a WSDL file</td>
+</tr>
+
<tr>
- <td valign="top">win32res</td>
- <td valign="top">filename of a win32 resource (.RES)file to include
- This is not a .NET resource, but it what windows is used to.</td>
- <td valign="top">"res/myapp.res"</td>
- </tr>
+ <td><a href="ImportTypelib.html">ImportTypelib</a></td>
+ <td>Imports a COM type library into .NET</td>
+</tr>
</table>
-<p>
-Example
-</p>
-<pre><csc
- optimize="true"
- debug="false"
- docFile="documentation.xml"
- warnLevel="4"
- unsafe="false"
- targetType="exe"
- incremental="false"
- definitions="RELEASE"
- excludes="src/unicode_class.cs"
- mainClass = "MainApp"
- destFile="NetApp.exe"
- />
-</pre>
-<hr>
-<h2><VBC></h2>
-
-This task compiles VisualBasic.NET source into executables or modules.
-This task compiles VisualBasic.NET source into executables or modules.
-The task will only work on win2K/XP or other platforms with vbc.exe
-or an equivalent. VBC must be on the execute path.
-<p>
-All parameters are optional: <vbc/> should suffice to produce a debug
-build of all *.vb files. References to external files do require explicit
-enumeration, so are one of the first attributes to consider adding. </p>
+<hr>
+<h2> Change Log </h2>
+<h4>Ant1.6</h4>
+This revision goes along with NET 1.1, though there is no reason why
+it should not work on other versions.
<p>
-The task is a directory based task, so attributes like
-<b>includes="**/*.vb"</b> and
-<b>excludes="broken.vb"</b> can be used to control
-the files pulled in. By default,
-all *.vb files from the project folder down are included in the command.
-When this happens the destFile -if not specified-
-is taken as the first file in the list, which may be somewhat hard to control.
-Specifying the output file with <b>'destfile'</b> seems prudent. </p>
-<p>
-Also, dependency checking only works if destfile is set.
+<ol>
+<li>vbc task</li>
+<li>jsharp task</li>
+<li>mono support</li>
+<li>ilasm</li>
+<li>tlbimport</li>
+<li>Reference filesets in the compiler tasks</li>
+<li>definitions in the compiler tasks</li>
+<li>multiple source filesets in the compiler tasks. If these are used, the
+implicit fileset is disabled</li>
+</ol>
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example Values</b></td>
- </tr>
+The compile tasks: vbc, jsharp, and csc, all contain lots of common code
+in a shared base class: if you can use one you should be able to use
+another.
-<tr>
- <td valign="top">additionalModules</td>
- <td valign="top">Semicolon separated list of modules to refer to</td>
- </tr>
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- </td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
-<tr>
- <td valign="top">definitions</td>
- <td valign="top">defined constants</td>
- <td valign="top"> "RELEASE;BETA1"</td>
- </tr>
-<tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">"true"(default)</td>
- </tr>
+<h4>Ant 1.5</h4>
+This revision goes along with NET 1.0 (SP1)
+<ol>
+<li>CSC: added filealign</li>
+<li>CSC: added reference to office.dll</li>
+<li>CSC: dependency checking! only if destFile is set!
+<li>WsdlToDotnet written
+</ol>
-<tr>
- <td valign="top">destFile</td>
- <td valign="top">name of exe/library to create</td>
- <td valign="top">"example.exe"</td>
- </tr>
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the VisualBasicCompile task </td>
- <td>"/warnaserror+ /baseaddress:0x12840000"</td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default) or "false"</td>
- </tr>
- <tr>
- <td valign="top">imports</td>
- <td valign="top">comma-separated list of global imports for namespaces
- in referenced metadata files.</td>
- </tr>
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
-<tr>
- <td valign="top">mainClass</td>
- <td valign="top">name of main class for executables</td>
- <td valign="top">"com.example.project.entrypoint"</td>
- </tr>
-<tr>
- <td valign="top">optimize</td>
- <td valign="top">optimisation flag</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionCompare</td>
- <td valign="top">Text or binary string comparisons.</td>
- <td valign="top">"text" or "binary"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionExplicit</td>
- <td valign="top">Require explicit declaration of variables?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">optionStrict</td>
- <td valign="top">Enforce strict language semantics?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">references</td>
- <td valign="top">Semicolon separated list of dlls to refer to</td>
- <td valign="top">"mylib.dll;nunit.dll"</td>
- </tr>
-<tr>
- <td valign="top">referenceFiles </td>
- <td valign="top">Ant Path descriptioon of references to include.
- Wildcards should work. </td>
- <td valign="top"></td>
- </tr>
-<tr>
- <td valign="top">removeIntChecks</td>
- <td valign="top">Remove integer checks?</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">rootNamespace</td>
- <td valign="top">Root namespace for all type declarations.</td>
- <td valign="top">com.example</td>
- </tr>
-
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top">"."</td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target</td>
- <td valign="top">"exe", "module", "winexe" or "library"</td>
- </tr>
-<tr>
- <td valign="top">utf8output</td>
- <td valign="top">require all compiler output to be in utf-8 format</td>
- <td valign="top">"true" or "false"(default)</td>
- </tr>
-<tr>
- <td valign="top">warnLevel</td>
- <td valign="top">level of warning currently between 1 and 4 with 4
- being the strictest. </td>
- <td valign="top">"1"-"4"</td>
- </tr>
-<tr>
- <td valign="top">win32Icon</td>
- <td valign="top">filename of icon to include</td>
- <td valign="top">"res/myicon.ico"</td>
- </tr>
-<tr>
- <td valign="top">win32res</td>
- <td valign="top">filename of a win32 resource (.RES)file to include
- This is not a .NET resource, but it what windows is used to.</td>
- <td valign="top">"res/myapp.res"</td>
- </tr>
+<h4>Version 0.4</h4>
+This is the beta-2 revision of the tasks.
+<ol>
+<li>ILASM: pulled the owner attribute, added keyfile for giving binaries a strong name
+(MD5 hash of the checksum)</li>
+<li>CSC: added win32res , noConfig, utf8output, fullpaths</li>
+<li>CSC: </li>
+</ol>
+
+<h4>Version 0.3</h4>
-</table>
-<p>
-Example
-</p>
-<pre><vbc
- optimize="true"
- debug="false"
- warnLevel="4"
- targetType="exe"
- definitions="RELEASE"
- excludes="src/unicode_class.vb"
- mainClass = "MainApp"
- destFile="NetApp.exe"
- optionExplicit="true"
- optionCompare="text"
- />
-</pre>
-<hr>
-<h2><ilasm></h2>
-<p>Task to assemble .net 'Intermediate Language' files.
-The task will only work on windows until other platforms support csc.exe or
-an equivalent. ilasm.exe must be on the execute path too.
-</p>
+The changes here reflect Beta-1 of the dotnet SDK and experience of use in
+more complex projects. This build does not work with the older SDK,
+primarily because the automatic reference feature references libraries
+only found in the new SDK version.
<p>
-All parameters are optional: <il/> should suffice to produce a debug
-build of all *.il files.
-The option set is roughly compatible with the CSharp class;
-even though the command line options are only vaguely
-equivalent. [The low level commands take things like /OUT=file,
-csc wants /out:file ... /verbose is used some places; /quiet here in
-ildasm... etc.] It would be nice if someone made all the command line
-tools consistent (and not as brittle as the java cmdline tools)
-</p>
+External changes</p>
+<ul>
+<li>Recursive inclusion of .cs and .il files</li>
-<p>
+<li>Documentation enhanced, includes examples and details of all parameters</li>
-The task is a directory based task, so attributes like <b>includes="*.il"</b> and
-<b>excludes="broken.il"</b> can be used to control the files pulled in.
-Each file is built on its own, producing an appropriately named output file unless
-manually specified with <b>outfile</b>
-</p>
-
-
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example</b></td>
- </tr>
-
- <tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- ("yes"/"no"). Default excludes are used when omitted.</td>
- </tr>
-
- <tr>
- <td valign="top">debug</td>
- <td valign="top">include debug information</td>
- <td valign="top">true (default)</td>
- </tr>
-
- <tr>
- <td valign="top">excludes</td>
- <td valign="top">comma separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- </tr>
- <tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the ilasm task, primarily because they
- arent really documented: use ilasm /? to see them</td>
- <td></td>
- </tr>
-
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should a failed compile halt the build?</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">fullpaths</td>
- <td valign="top">Should error text provide the full path to files</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">includes</td>
- <td valign="top">comma separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- </tr>
- <tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- </tr>
- <tr>
- <td valign="top">keyfile</td>
- <td valign="top">the name of a file containing a private key, with which
- the assembly output is checksumed and then MD5 signed
- to have a <i>strong name</i></td>
- </tr>
-<tr>
- <td valign="top">listing</td>
- <td valign="top">Produce a listing (off by default). Listings go to the
- current output stream</td>
- <td valign="top">"on", "off" (default)</td>
- </tr>
-<tr>
- <td valign="top">outputFile</td>
- <td valign="top">filename of output</td>
- <td valign="top">"example.exe"</td>
- </tr>
-<tr>
- <td valign="top">resourceFile</td>
- <td valign="top">name of resource file to include</td>
- <td valign="top">"resources.res"</td>
- </tr>
-<tr>
- <td valign="top">srcDir</td>
- <td valign="top">source directory (default = project directory)</td>
- <td valign="top"></td>
- </tr>
-<tr>
- <td valign="top">targetType</td>
- <td valign="top">Type of target. library means DLL is output. </td>
- <td valign="top">"exe"(default), "library"</td>
- </tr>
-<tr>
- <td valign="top">verbose</td>
- <td valign="top">output progress messages</td>
- <td valign="top">"on", "off" (default)</td>
- </tr>
+<li>The csc task automatically includes the common dotnet assemblies, so
+there is no need to remember to refer to 'System.dll', 'System.Web.Services',
+ etc. This feature can be disabled by setting the 'includeDefaultReferences'
+ flag to false. </li>
-</table>
-<p>
-Example</p>
-<pre><ilasm
- outputFile="app.exe"
- verbose="on"
- listing="on"
- owner="secret"
- />
-</pre>
-<h2><WsdlToDotnet></h2>
-Why add a wrapper to the MS WSDL tool?
-So that you can verify that your web services, be they written with Axis or
-anyone else's SOAP toolkit, work with .NET clients.
-<p>
-This task is dependency aware when using a file as a source and destination;
-so if you <get> the file (with <code>usetimestamp="true"</code>) then
-you only rebuild stuff when the WSDL file is changed. Of course,
-if the server generates a new timestamp every time you ask for the WSDL,
-this is not enough...use the <filesmatch> <condition> to
-to byte for byte comparison against a cached WSDL file then make
-the target conditional on that test failing.
-
-<table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Example</b></td>
- </tr>
- <tr>
- <td valign="top">destFile</td>
- <td valign="top">name of file to generate. Required</td>
- <td valign="top">ApacheNet.cs</td>
- </tr>
- <tr>
- <td valign="top">srcFile</td>
- <td valign="top">name of WSDL file to use.
- Required if url is not set</td>
- <td valign="top">service.wsdl</td>
- </tr>
- <tr>
- <td valign="top">url</td>
- <td valign="top">url to retrive WSDL from.
- required if srcFile is unset</td>
- <td valign="top">http://localhost/service?wsdl</td>
- </tr>
- <tr>
- <td valign="top">server</td>
- <td valign="top">generate server stubs, not client proxy code.
- optional; default false</td>
- <td valign="top">"false"(default)</td>
- </tr>
- <tr>
- <td valign="top">namespace</td>
- <td valign="top">namespace to place the source in.
- optional; default ""</td>
- <td valign="top">Apache.Net</td>
- </tr>
- <tr>
- <td valign="top">language</td>
- <td valign="top">language; one of "CS", "JS", or "VB"
- optional; </td>
- <td valign="top"> "CS" (default)</td>
- </tr>
- <tr>
- <td valign="top">failOnError</td>
- <td valign="top">Should failure halt the build?</td>
- <td valign="top">"true"(default)</td>
- </tr>
- <tr>
- <td valign="top">extraOptions</td>
- <td valign="top">Any extra options which aren't explicitly
- supported by the task, like all the proxy server config stuff</td>
- <td></td>
- </tr>
-
- </table>
-<hr>
+ <li> References can also be referred to using the ReferenceFiles parameter, which
+is an ant path specification. The old 'references' string is still retained.</li>
+<li> An 'extraoptions' attribute enables the build file to include any CSC options
+which are not explicitly supported in the CSC task. </li>
+</ul>
-<hr>
+Internal changes
+<ul>
+<li>Some minor refactoring (move common code a method)</li>
+<li>Application of Jedits JavaStyle task resulted in a major reshaping of
+the codebase and the insertion of a blank line every second line. Significant
+effort was required to revert some (but not all) changes.</li>
+<li>Removed throws clause from methods which can't throw exception<hr>
<h2> Change Log </h2>
+<h4>Ant1.6</h4>
+This revision goes along with NET 1.1, though there is no reason why
+it should not work on other versions.
+<p>
+
+<ol>
+<li>vbc task</li>
+<li>jsharp task</li>
+<li>mono support</li>
+<li>ilasm</li>
+<li>tlbimport</li>
+<li>Reference filesets in the compiler tasks</li>
+<li>definitions in the compiler tasks</li>
+<li>multiple source filesets in the compiler tasks. If these are used, the
+implicit fileset is disabled</li>
+</ol>
+
+The compile tasks: vbc, jsharp, and csc, all contain lots of common code
+in a shared base class: if you can use one you should be able to use
+another.
+
<h4>Version 0.5</h4>
This revision goes along with NET 1.0 (SP1)
<ol>
@@ -665,6 +248,21 @@
the codebase and the insertion of a blank line every second line. Significant
effort was required to revert some (but not all) changes.</li>
<li>Removed throws clause from methods which can't throw exceptions </li>
+</ul>
+
+The test harness has been expanded to include unicode source file
+(the build works but the rest of the system has 'issues' with high unicode
+package and method names)
+
+<h4>Version 0.2</h4>
+First public edition, added to the ant cvs tree. Tested on the PDC build of
+the dotnet SDK only, and still immature. The command execution code was
+refactored out into a 'NetCommand' class for re-use. The Ilasm task was added
+at this time.
+
+<h4>Version 0.1</h4>
+Initial proof of concept; very rudimentary support for CSC only.
+s </li>
</ul>
The test harness has been expanded to include unicode source file
1.1.2.1 +0 -0 ant/docs/manual/OptionalTasks/csc.html
Index: csc.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/csc.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
1.1.2.1 +0 -0 ant/docs/manual/OptionalTasks/ilasm.html
Index: ilasm.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/ilasm.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
1.1.2.1 +0 -0 ant/docs/manual/OptionalTasks/ildasm.html
Index: ildasm.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/ildasm.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
1.1.2.1 +0 -0 ant/docs/manual/OptionalTasks/importtypelib.html
Index: importtypelib.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/importtypelib.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
1.1.2.1 +0 -0 ant/docs/manual/OptionalTasks/jsharp.html
Index: jsharp.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/jsharp.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
1.1.2.1 +0 -0 ant/docs/manual/OptionalTasks/wsdltodotnet.html
Index: wsdltodotnet.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/wsdltodotnet.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org