diff --git a/WHATSNEW b/WHATSNEW index 28554a0ba..dd7dd986c 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -289,6 +289,9 @@ automatic use of response files. Bugzilla report #19630 Other changes: -------------- + +* Shipped XML parser is now Xerces 2.6.0 + * All tasks can be used outside of s. Note that some tasks will not work at all outside of targets as they would cause infinite loops ( as well as and if they invoke the diff --git a/docs/manual/OptionalTasks/csc.html b/docs/manual/OptionalTasks/csc.html index 8a7f9a952..e6f42a2cf 100644 --- a/docs/manual/OptionalTasks/csc.html +++ b/docs/manual/OptionalTasks/csc.html @@ -46,7 +46,7 @@
- Compiles C# source into executables or modules. csc.exe must be on the execute path, unless another executable or the full path to that executable is specified in the executable parameter

All parameters are optional: <csc/> should suffice to produce a debug build of all *.cs files. However, naming an destFilestops the csc compiler from choosing an output name from random, and allows the dependency checker to determine if the file is out of date.

The task is a directory based task, so attributes like includes="*.cs" and excludes="broken.cs" 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 output file -if not specified- is taken as the first file in the list, which may be somewhat hard to control. Specifying the output file with destFile seems prudent.

For more complex source trees, nested src elemements can be supplied. When such an element is present, the implicit fileset is ignored. This makes sense, when you think about it :)

References to external files can be made through the references attribute, or (since Ant1.6), via nested <reference> filesets. With the latter, the timestamps of the references are also used in the dependency checking algorithm.

Example

<csc optimize="true" debug="false" docFile="documentation.xml" warnLevel="4" unsafe="false" targetType="exe" incremental="false" mainClass = "MainApp" destFile="NetApp.exe" > <src dir="src" includes="*.cs" /> <reference file="${testCSC.dll}" /> <define name="RELEASE" /> <define name="DEBUG" if="debug.property"/> <define name="def3" unless="def3.property"/> </csc> 
+ Compiles C# source into executables or modules. csc.exe on Windows or mcs on any other platform must be on the execute path, unless another executable or the full path to that executable is specified in the executable parameter

All parameters are optional: <csc/> should suffice to produce a debug build of all *.cs files. However, naming an destFilestops the csc compiler from choosing an output name from random, and allows the dependency checker to determine if the file is out of date.

The task is a directory based task, so attributes like includes="*.cs" and excludes="broken.cs" 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 output file -if not specified- is taken as the first file in the list, which may be somewhat hard to control. Specifying the output file with destFile seems prudent.

For more complex source trees, nested src elemements can be supplied. When such an element is present, the implicit fileset is ignored. This makes sense, when you think about it :)

References to external files can be made through the references attribute, or (since Ant1.6), via nested <reference> filesets. With the latter, the timestamps of the references are also used in the dependency checking algorithm.

Example

<csc optimize="true" debug="false" docFile="documentation.xml" warnLevel="4" unsafe="false" targetType="exe" incremental="false" mainClass = "MainApp" destFile="NetApp.exe" > <src dir="src" includes="*.cs" /> <reference file="${testCSC.dll}" /> <define name="RELEASE" /> <define name="DEBUG" if="debug.property"/> <define name="def3" unless="def3.property"/> </csc> 
diff --git a/src/etc/testcases/taskdefs/optional/dotnet.xml b/src/etc/testcases/taskdefs/optional/dotnet.xml index a3111f6e1..68f64866f 100644 --- a/src/etc/testcases/taskdefs/optional/dotnet.xml +++ b/src/etc/testcases/taskdefs/optional/dotnet.xml @@ -156,7 +156,6 @@ @@ -193,7 +192,6 @@ destFile="${testCSC.exe}" targetType="exe" srcDir="." - executable="mcs" includedefaultreferences="true" > @@ -227,7 +225,6 @@ @@ -265,7 +262,6 @@ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java index 04ba9a509..52516a49a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java @@ -70,12 +70,14 @@ package org.apache.tools.ant.taskdefs.optional.dotnet; import java.io.File; +import org.apache.tools.ant.taskdefs.condition.Os; + // ==================================================================== /** * Compiles C# source into executables or modules. * - * csc.exe must be on the execute path, unless another executable + * csc.exe on Windows or mcs on other platforms must be on the execute path, unless another executable * or the full path to that executable is specified in the executable * parameter *

@@ -190,7 +192,7 @@ public class CSharp extends DotnetCompile { unsafe = false; noconfig = false; definitions = null; - setExecutable("csc"); + setExecutable(Os.isFamily("windows") ? "csc" : "mcs"); }