: nant -v
NAnt 0.85 (Build 0.85.2478.0; release; 14-Oct-06)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Framework 'net-1.0' is invalid and has not been loaded : The 'System.dll' assembly does not exist in framework assembly director
y 'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705'..

Framework 'netcf-1.0' is invalid and has not been loaded : Registry Value Not Found! - key='SOFTWARE\Microsoft\.NETCompactFramew
ork\\sdkInstallRoot';hive='LocalMachine';.

Framework 'netcf-2.0' is invalid and has not been loaded : Registry Path Not Found! - key='SOFTWARE\Microsoft\.NETCompactFramewo
rk\v2.0.0.0\InstallRoot\';hive='Microsoft.Win32.RegistryHive[]';.

Framework 'mono-1.0' is invalid and has not been loaded : Registry Path Not Found! - key='SOFTWARE\Mono\';hive='Microsoft.Win32.
RegistryHive[]';.

Framework 'mono-2.0' is invalid and has not been loaded : Registry Path Not Found! - key='SOFTWARE\Mono\';hive='Microsoft.Win32.
RegistryHive[]';.

Framework 'mono-2.0' is invalid and has not been loaded : Registry Path Not Found! - key='SOFTWARE\Mono\';hive='Microsoft.Win32.
RegistryHive[]';.

Framework 'mono-2.0' is invalid and has not been loaded : Registry Path Not Found! - key='SOFTWARE\Mono\';hive='Microsoft.Win32.
RegistryHive[]';.

Framework 'sscli-1.0' is invalid and has not been loaded : Framework directory 'C:\sscli\build\v1.x86fstchk.rotor' does not exis
t..

Buildfile: file:///d:/tmp/test.build
Target framework: Microsoft .NET Framework 2.0
Base Directory: d:\tmp.
Target(s) specified: test

  [taskdef] Creating task exec_wd
  [taskdef] *** Custom code start ***
  [taskdef] <script language='C#' >
  [taskdef] <imports> <import namespace="System.Xml" /> <import namespace="NAnt.Core.Types" /> </imports> <code> <![CDATA[
  [taskdef] [TaskName("exec_wd")]
  [taskdef] public class exec_wd : Task
  [taskdef] {
  [taskdef]
  [taskdef]     static private string _originalXml = XmlConvert.DecodeName("_x003C_do_x003E__x003C_choose_x003E__x003C_when_x002
0_test_x003D__x0022__x0024__x007B__x0027___wdir___x0027__x0020__x003D__x003D__x0020__x0027__x0027__x007D__x0022__x003E__x003C_ex
ec_x0020_verbose_x003D__x0022__x0024__x007B_verbose_x007D__x0022__x0020_program_x003D__x0022___prog___x0022__x0020_commandline_x
003D__x0022___args___x0022__x0020__x002F__x003E__x003C__x002F_when_x003E__x003C_otherwise_x003E__x003C_exec_x0020_verbose_x003D_
_x0022__x0024__x007B_verbose_x007D__x0022__x0020_program_x003D__x0022___prog___x0022__x0020_commandline_x003D__x0022___args___x0
022__x0020_workingdir_x003D__x0022___wdir___x0022__x0020__x002F__x003E__x003C__x002F_otherwise_x003E__x003C__x002F_choose_x003E_
_x003C__x002F_do_x003E_");
  [taskdef]
  [taskdef]     private string __prog = string.Empty ;
  [taskdef]
  [taskdef]     [TaskAttribute("prog", Required=true)]
  [taskdef]     public string _prog
  [taskdef]     {
  [taskdef]         get { return __prog; }
  [taskdef]         set { __prog = value; }
  [taskdef]     }
  [taskdef]
  [taskdef]     private string __args = string.Empty ;
  [taskdef]
  [taskdef]     [TaskAttribute("args", Required=true)]
  [taskdef]     public string _args
  [taskdef]     {
  [taskdef]         get { return __args; }
  [taskdef]         set { __args = value; }
  [taskdef]     }
  [taskdef]
  [taskdef]     private string __wdir = string.Empty ;
  [taskdef]
  [taskdef]     [TaskAttribute("wdir", Required=false)]
  [taskdef]     public string _wdir
  [taskdef]     {
  [taskdef]         get { return __wdir; }
  [taskdef]         set { __wdir = value; }
  [taskdef]     }
  [taskdef]
  [taskdef]     protected override void ExecuteTask()
  [taskdef]     {
  [taskdef]         Log(Level.Info, "Running custom script");
  [taskdef]         Log(Level.Verbose, "Original script : " + _originalXml);
  [taskdef]         string xml = _originalXml;
  [taskdef]         XmlDocument scriptDom = new XmlDocument();
  [taskdef]         scriptDom.LoadXml(xml);
  [taskdef]         xml = scriptDom.OuterXml;
  [taskdef]         xml = xml.Replace("__prog__", _prog);
  [taskdef]         xml = xml.Replace("__args__", _args);
  [taskdef]         xml = xml.Replace("__wdir__", _wdir);
  [taskdef]         scriptDom.LoadXml(xml);
  [taskdef]         Log(Level.Verbose, "Generated script: " + scriptDom.InnerXml);
  [taskdef]         foreach (XmlNode node in scriptDom.ChildNodes[0].ChildNodes)
  [taskdef]         {
  [taskdef]             if (node.Name == "#comment")
  [taskdef]                 continue;
  [taskdef]             Log(Level.Verbose, "Running task: " + node.OuterXml);
  [taskdef]             Project.CreateTask(node).Execute();
  [taskdef]         }
  [taskdef]     }
  [taskdef] }
  [taskdef] ]]></code></script>
  [taskdef] *** Custom code end ***
   [script] Scanning assembly "wcufy1z3" for extensions.
  [taskdef] Creating task exec_shell
  [taskdef] *** Custom code start ***
  [taskdef] <script language='C#' >
  [taskdef] <imports> <import namespace="System.Xml" /> <import namespace="NAnt.Core.Types" /> </imports> <code> <![CDATA[
  [taskdef] [TaskName("exec_shell")]
  [taskdef] public class exec_shell : Task
  [taskdef] {
  [taskdef]
  [taskdef]     static private string _originalXml = XmlConvert.DecodeName("_x003C_do_x003E__x003C_property_x0020_if_x003D__x002
2__x0024__x007B__x0027___sh___x0027__x0020__x003D__x003D__x0020__x0027_cmd_x0027__x007D__x0022__x0020_name_x003D__x0022_x_cmd_x_
x0022__x0020_value_x003D__x0022__x002F_C_x0020___cmd___x0022__x0020__x002F__x003E__x003C_property_x0020_if_x003D__x0022__x0024__
x007B__x0027___sh___x0027__x0020__x0021__x003D__x0020__x0027_cmd_x0027__x007D__x0022__x0020_name_x003D__x0022_x_cmd_x_x0022__x00
20_value_x003D__x0022_-c_x0020__x0026_quot_x003B___cmd___x0026_quot_x003B__x0022__x0020__x002F__x003E__x003C_exec_wd_x0020_prog_
x003D__x0022___sh___x0022__x0020_args_x003D__x0022__x0024__x007B_x_cmd_x_x007D__x0022__x0020_wdir_x003D__x0022___wdir___x0022__x
0020__x002F__x003E__x003C__x002F_do_x003E_");
  [taskdef]
  [taskdef]     private string __sh = string.Empty ;
  [taskdef]
  [taskdef]     [TaskAttribute("sh", Required=true)]
  [taskdef]     public string _sh
  [taskdef]     {
  [taskdef]         get { return __sh; }
  [taskdef]         set { __sh = value; }
  [taskdef]     }
  [taskdef]
  [taskdef]     private string __cmd = string.Empty ;
  [taskdef]
  [taskdef]     [TaskAttribute("cmd", Required=true)]
  [taskdef]     public string _cmd
  [taskdef]     {
  [taskdef]         get { return __cmd; }
  [taskdef]         set { __cmd = value; }
  [taskdef]     }
  [taskdef]
  [taskdef]     private string __wdir = string.Empty ;
  [taskdef]
  [taskdef]     [TaskAttribute("wdir", Required=false)]
  [taskdef]     public string _wdir
  [taskdef]     {
  [taskdef]         get { return __wdir; }
  [taskdef]         set { __wdir = value; }
  [taskdef]     }
  [taskdef]
  [taskdef]     protected override void ExecuteTask()
  [taskdef]     {
  [taskdef]         Log(Level.Info, "Running custom script");
  [taskdef]         Log(Level.Verbose, "Original script : " + _originalXml);
  [taskdef]         string xml = _originalXml;
  [taskdef]         XmlDocument scriptDom = new XmlDocument();
  [taskdef]         scriptDom.LoadXml(xml);
  [taskdef]         xml = scriptDom.OuterXml;
  [taskdef]         xml = xml.Replace("__sh__", _sh);
  [taskdef]         xml = xml.Replace("__cmd__", _cmd);
  [taskdef]         xml = xml.Replace("__wdir__", _wdir);
  [taskdef]         scriptDom.LoadXml(xml);
  [taskdef]         Log(Level.Verbose, "Generated script: " + scriptDom.InnerXml);
  [taskdef]         foreach (XmlNode node in scriptDom.ChildNodes[0].ChildNodes)
  [taskdef]         {
  [taskdef]             if (node.Name == "#comment")
  [taskdef]                 continue;
  [taskdef]             Log(Level.Verbose, "Running task: " + node.OuterXml);
  [taskdef]             Project.CreateTask(node).Execute();
  [taskdef]         }
  [taskdef]     }
  [taskdef] }
  [taskdef] ]]></code></script>
  [taskdef] *** Custom code end ***
   [script] Scanning assembly "h2md80m5" for extensions.

test:

[exec_shell] Running custom script
[exec_shell] Original script : <do><property if="${'__sh__' == 'cmd'}" name="x_cmd_x" value="/C __cmd__" /><property if="${'__sh
__' != 'cmd'}" name="x_cmd_x" value="-c &quot;__cmd__&quot;" /><exec_wd prog="__sh__" args="${x_cmd_x}" wdir="__wdir__" /></do>
[exec_shell] Generated script: <do><property if="${'sh' == 'cmd'}" name="x_cmd_x" value="/C ls -l" /><property if="${'sh' != 'cm
d'}" name="x_cmd_x" value="-c &quot;ls -l&quot;" /><exec_wd prog="sh" args="${x_cmd_x}" wdir="" /></do>
[exec_shell] Running task: <property if="${'sh' == 'cmd'}" name="x_cmd_x" value="/C ls -l" />
[exec_shell] Running task: <property if="${'sh' != 'cmd'}" name="x_cmd_x" value="-c &quot;ls -l&quot;" />
[exec_shell] Running task: <exec_wd prog="sh" args="${x_cmd_x}" wdir="" />
  [exec_wd] Running custom script
  [exec_wd] Original script : <do><choose><when test="${'__wdir__' == ''}"><exec verbose="${verbose}" program="__prog__" command
line="__args__" /></when><otherwise><exec verbose="${verbose}" program="__prog__" commandline="__args__" workingdir="__wdir__" /
></otherwise></choose></do>

BUILD FAILED

INTERNAL ERROR

System.Xml.XmlException: 'ls' is an unexpected token. Expecting white space. Line 1, position 95.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseAttributes()
   at System.Xml.XmlTextReaderImpl.ParseElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.LoadXml(String xml)
   at nant26cb4f97f1c9421a8d5bf6f707a3fd91.exec_wd.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at nant96b53288883b4d2f8706ecdcbbf78d92.exec_shell.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()

Please send bug report to nant-developers@lists.sourceforge.net.

Total time: 2 seconds.

