hi, i have created ASP.NET Application that execute the nant tasks. **i added a reference as *NAnt*.Core.dll and log4net.dll.
i have added configuration for <nant> in "web. config file" (taken from from NAnt.exe.config). This is my code protected void Page_Load(object sender, EventArgs e) { try { Project p = new Project("d:\\samp.build", Level.None, 0); p.TaskStarted += new BuildEventHandler(p_TaskStarted); p.TaskFinished += new BuildEventHandler(p_TaskFinished); p.TargetStarted += new BuildEventHandler(p_TargetStarted); p.TargetFinished += new BuildEventHandler(p_TargetFinished); p.Run(); } catch (Exception ex) { Response.Write(ex.ToString()); } } when run this application i get this Exception Untitled PageFailed to initialize the 'Microsoft .NET Framework 2.0' (net-2.0) target framework.: NAnt.Core.BuildException: Failed to initialize the 'Microsoft .NET Framework 2.0' (net-2.0) target framework. ---> Invalid element . Unknown task or datatype.: NAnt.Core.BuildException: Invalid element . Unknown task or datatype. at NAnt.Core.Project.InitializeProjectDocument(XmlDocument doc) at NAnt.Core.Project.Execute() at NAnt.Core.FrameworkInfo.PerformInit() at NAnt.Core.FrameworkInfo.Init() --- End of inner exception stack trace --- at NAnt.Core.FrameworkInfo.Init() at NAnt.Core.FrameworkInfo.Validate() at NAnt.Core.ProjectSettingsLoader.ConfigureRuntimeFramework() at NAnt.Core.ProjectSettingsLoader.ProcessPlatform(XmlNode platformNode) at NAnt.Core.ProjectSettingsLoader.ProcessSettings() at NAnt.Core.Project.CtorHelper(XmlDocument doc, Level threshold, Int32 indentLevel, Optimizations optimization) at NAnt.Core.Project..ctor(String uriOrFilePath, Level threshold, Int32 indentLevel) at _Default.Page_Load(Object sender, EventArgs e) in d:\project2005\Default.aspx.cs:line 19. i am using 'nant-0.90-beta1'. i have checked in previous releases it gives me this Exception "The-current-runtime-framework-'net-2.0'-is-not-correctly-configured-in-the-NAnt-configuration-file" Actually its working fine in Console Application. But not in Asp.net application Any ideas?. Please help me out.. Thanks in Advance Regards, Guna
------------------------------------------------------------------------------
_______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users