Hi,

I don't know what exactly is in your build file but are you including
a reference to System.Xml.dll in your build?

Thanks,
Ryan

On Fri, Mar 9, 2012 at 8:03 PM, Sunil Singh <sunil1...@gmail.com> wrote:
> Hi All,
> I recemtly tried to use nant 0.91 to do build on windows 2003 server
> but got following error.  I tried on multiple machine but same issue.
> I have ,net 4.0 installed ..
>
> Am i missing anything.??
>
> NAnt 0.91 (Build 0.91.4312.0; release; 10/22/2011)
>
> Copyright (C) 2001-2011 Gerry Shaw
>
> http://nant.sourceforge.net
>
>
>
> Buildfile: file:///G:/TFS/BetaEngine/Deployment/Scripts/build.xml
>
> Target framework: Microsoft .NET Framework 4.0
>
> Target(s) specified: createDrop
>
>
>
>
>
> OnFailure:
>
>
>
>     [echo] Build failed at 03/08/2012 19:50:56
>
>
>
> BUILD FAILED
>
>
>
> Compilation failed:
>
> c:\Documents and Settings\sysibdpribuilduserd\Local
> Settings\Temp\1\fohsvsqg.0.cs(17,14) : error CS0234: The type or
> namespace name 'Xml' does not
>
> //------------------------------------------------------------------------------
>
> // <auto-generated>
>
> //     This code was generated by a tool.
>
> //     Runtime Version:4.0.30319.488
>
> //
>
> //     Changes to this file may cause incorrect behavior and will be lost if
>
> //     the code is regenerated.
>
> // </auto-generated>
>
> //------------------------------------------------------------------------------
>
>
>
> using NAnt.Core;
>
> using NAnt.Core.Attributes;
>
> using System;
>
> using System.Collections;
>
> using System.IO;
>
> using System.Text;
>
> using System.Xml;
>
>
>
>
>
>
>
> [FunctionSet("DeployUtils", "DeployUtils")]
>
> public class nantddaf318abf45436db87f93cbfb2ae9ea : NAnt.Core.FunctionSetBase 
> {
>
>
>
>
>
>  [TaskName("fixXpath")]
>
>  public class FixXPathTask : Task {
>
>
>
>    private string _srcFile;
>
>    private string _xpath;
>
>    private string _attribute;
>
>    private string _value;
>
>    private string _ns;
>
>
>
>    private string _execStatus;
>
>
>
>    [TaskAttribute("file", Required=true)]
>
>    public string SrcFile {
>
>     get { return _srcFile; }
>
>     set { _srcFile = value; }
>
>    }
>
>
>
>    [TaskAttribute("xpath", Required=true)]
>
>    public string XPath {
>
>     get { return _xpath; }
>
>     set { _xpath = value; }
>
>    }
>
>
>
>    [TaskAttribute("attribute", Required=true)]
>
>    public string Attribute {
>
>     get { return _attribute; }
>
>     set { _attribute = value; }
>
>    }
>
>
>
>    [TaskAttribute("value", Required=true)]
>
>    public string Value {
>
>     get { return _value; }
>
>     set { _value = value; }
>
>    }
>
>
>
>    [TaskAttribute("namespace", Required=false)]
>
>    public string Namespace {
>
>     get { return _ns; }
>
>     set { _ns = value; }
>
>    }
>
>
>
>
>
>    protected override void ExecuteTask() {
>
>
>
>   Console.WriteLine("Fixing " + SrcFile + " "+XPath+ " " + Attribute);
>
>
>
>   XmlDocument doc = new XmlDocument();
>
>            doc.Load(SrcFile);
>
>
>
>            XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
>
>   if (Namespace != null)
>
>   {
>
>    nsmgr.AddNamespace(String.Empty, Namespace);
>
>   }
>
>            XmlNode node = doc.SelectSingleNode(XPath ,nsmgr);
>
>            Console.WriteLine(node == null ? "Node Not Found" : "Node Found");
>
>         node.Attributes[Attribute].Value = Value;
>
>            XmlWriterSettings settings = new XmlWriterSettings();
>
>            settings.Indent = true;
>
>            XmlWriter xw = XmlWriter.Create(SrcFile, settings);
>
>            doc.WriteContentTo(xw);
>
>            xw.Close();
>
>    }
>
>  }
>
>
>
>  [TaskName("fixAllXpath")]
>
>  public class FixAllXPathTask : FixXPathTask {
>
>
>
>    private string _srcFile;
>
>    private string _xpath;
>
>    private string _attribute;
>
>    private string _value;
>
>    private string _ns;
>
>
>
>    private string _execStatus;
>
>
>
>    [TaskAttribute("file", Required=true)]
>
>    public string SrcFile {
>
>     get { return _srcFile; }
>
>     set { _srcFile = value; }
>
>    }
>
>
>
>    [TaskAttribute("xpath", Required=true)]
>
>    public string XPath {
>
>     get { return _xpath; }
>
>     set { _xpath = value; }
>
>    }
>
>
>
>    [TaskAttribute("attribute", Required=true)]
>
>    public string Attribute {
>
>     get { return _attribute; }
>
>     set { _attribute = value; }
>
>    }
>
>
>
>    [TaskAttribute("value", Required=true)]
>
>    public string Value {
>
>     get { return _value; }
>
>     set { _value = value; }
>
>    }
>
>
>
>    [TaskAttribute("namespace", Required=false)]
>
>    public string Namespace {
>
>     get { return _ns; }
>
>     set { _ns = value; }
>
>    }
>
>
>
>
>
>    protected override void ExecuteTask()
>
>    {
>
>
>
>     Console.WriteLine("Fixing " + SrcFile + " "+XPath+ " " + Attribute);
>
>     XmlDocument doc = new XmlDocument();
>
>     doc.Load(SrcFile);
>
>             XmlNamespaceManager nsmgr = new 
> XmlNamespaceManager(doc.NameTable);
>
>     if (Namespace != null)
>
>     {
>
>      nsmgr.AddNamespace("def", Namespace);
>
>     }
>
>        XmlNodeList nodeList = doc.SelectNodes(XPath ,nsmgr);
>
>  Console.WriteLine("Found Nodes "+nodeList.Count);
>
>        foreach(XmlNode node in nodeList)
>
>        {
>
>          node.Attributes[Attribute].Value = Value;
>
>        }
>
>
>
>
>
>        XmlWriterSettings settings = new XmlWriterSettings();
>
>        settings.Indent = true;
>
>        XmlWriter xw = XmlWriter.Create(SrcFile, settings);
>
>        doc.WriteContentTo(xw);
>
>        xw.Close();
>
>    }
>
>  }
>
>
>
>
>
>    public nantddaf318abf45436db87f93cbfb2ae9ea(NAnt.Core.Project
> project, NAnt.Core.PropertyDictionary propDict) :
>
>            base(project, propDict) {
>
>    }
>
> }
>
>
>
>
>
> Total time: 0.4 seconds.
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to