Here is a patch allows use NAnt-0.6 (mono/mcs/nant) on linux with mono.
I tested it with mono class library and looks like it works. But there
is little one problem - looks like mono's XML parser does not like
XML node naming "win32icon" - I dont why - sorry System.Xml is too
huge to analyze for me. But since mcs hasn't win32icon switch (??)
I've moved this parametre from CompilerBase.cs Task (which is base class form CscTask and McsTask) to CscTask.cs - so now You can't
use win32icon parameter in NAnt mcs tasks. Maybe developers of System.Xml should look why this statement
XmlNode.SelectSingleNode( "@win32icon" ) fails with XML parser
exception.
regards,
Artur.
? NAnt.diff
? src/NAnt.diff
Index: src/NAnt.exe
===================================================================
RCS file: /mono/mcs/nant/src/NAnt.exe,v
retrieving revision 1.1
diff -r1.1 NAnt.exe
Binary files /tmp/cvslIxnEa and NAnt.exe differ
Index: src/Task.cs
===================================================================
RCS file: /mono/mcs/nant/src/Task.cs,v
retrieving revision 1.1
diff -r1.1 Task.cs
157c157
< ValidatorAttribute[] validators = (ValidatorAttribute[])
Attribute.GetCustomAttributes(fieldInfo, typeof(ValidatorAttribute));
---
> Attribute[] validators =
>Attribute.GetCustomAttributes(fieldInfo, typeof(ValidatorAttribute));
159c159
< string errorMessage =
validator.Validate(fieldInfo.GetValue(this));
---
> string errorMessage =
>((ValidatorAttribute)validator).Validate(fieldInfo.GetValue(this));
Index: src/Tasks/CompilerBase.cs
===================================================================
RCS file: /mono/mcs/nant/src/Tasks/CompilerBase.cs,v
retrieving revision 1.2
diff -r1.2 CompilerBase.cs
46,48d45
< [TaskAttribute("win32icon")]
< string _win32icon = null;
<
65d61
< public string Win32Icon { get { return _win32icon; } }
144,146d139
< }
< if (Win32Icon != null) {
< WriteOption(writer, "win32icon", Win32Icon);
Index: src/Tasks/CscTask.cs
===================================================================
RCS file: /mono/mcs/nant/src/Tasks/CscTask.cs,v
retrieving revision 1.2
diff -r1.2 CscTask.cs
32a33,38
> [TaskAttribute("win32icon")]
> string _win32icon = null;
>
> public string Win32Icon { get { return _win32icon; } }
>
>
37c43,46
< }
---
> }
> if (Win32Icon != null) {
> WriteOption(writer, "win32icon", Win32Icon);
> }
