Hi, I'm trying to include a buildfile with global properties into another buildfile which would then use these properties. When I execute a target in the second buildfile NAnt complains the properties are not set...
I've attached the buildfile, the include file, and the verbose output from NAnt. Here is the non-verbose output form NAnt: <CommandLine> T:\firingsystems\nightlybuild>nant ccnet.config NAnt 0.85 (Build 0.85.1714.0; net-1.0.win32; nightly; 9/10/2004) Copyright (C) 2001-2004 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///T:/firingsystems/nightlybuild/ccnet.config.build Target(s) specified: ccnet.config ccnet.config: BUILD FAILED T:\firingsystems\nightlybuild\ccnet.config.build(13,6): Property evaluation failed. Expression: ${global.baseurl} ^^^^^^^^^^^^^^ Property 'global.baseurl' has not been set. Total time: 0 seconds. </CommandLine> I've tried a simple case where I try to include a single property and the single target in the buildfile simple <echo>s the property's value. That works as expected. I fear there might be a simple error in my buildfile or my include file but I can't figure out what that might be. Thanks for the help! --Edwin
ccnet.config.build
Description: ccnet.config.build
<?xml version="1.0" encoding="utf-8" ?> <project name="global include"> <property name="global.baseurl" value="http://localhost/ccnet/" description="Base URL for webapp" /> <property name="global.buildemail" value="[EMAIL PROTECTED]" description="From email used to send email reports" /> <property name="global.mailhost" value="localhost" description="Mailhost to use to send email reports" /> </project>
NAnt 0.85 (Build 0.85.1714.0; net-1.0.win32; nightly; 9/10/2004) Copyright (C) 2001-2004 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 directory 'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705'. Framework 'net-2.0' is invalid and has not been loaded : Framework directory 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607' does not exist. Framework 'mono-1.0' is invalid and has not been loaded : Registry Path Not Found! - key='SOFTWARE\Novell\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 exist. Buildfile: file:///T:/firingsystems/nightlybuild/ccnet.config.build Base Directory: T:\firingsystems\nightlybuild. Target(s) specified: ccnet.config [include] Including file T:\firingsystems\nightlybuild\global.include.xml. ccnet.config: BUILD FAILED T:\firingsystems\nightlybuild\ccnet.config.build(13,6): Property evaluation failed. Expression: ${global.baseurl} ^^^^^^^^^^^^^^: NAnt.Core.BuildException: T:\firingsystems\nightlybuild\ccnet.config.build(13,6): Property evaluation failed. Expression: ${global.baseurl} ^^^^^^^^^^^^^^ ---> Property 'global.baseurl' has not been set.: NAnt.Core.BuildException: Property 'global.baseurl' has not been set. at NAnt.Core.ExpressionEvaluator.GetPropertyValue(String propertyName) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\ExpressionEvaluator.cs:line 150 at NAnt.Core.ExpressionEvaluator.EvaluateProperty(String propertyName) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\ExpressionEvaluator.cs:line 65 at NAnt.Core.ExpressionEvalBase.ParseValue() in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\ExpressionEvalBase.cs:line 780 --- End of inner exception stack trace --- at NAnt.Core.PropertyDictionary.EvaluateEmbeddedExpressions(String input, Location location, Hashtable state, Stack visiting) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\PropertyDictionary.cs:line 380 at NAnt.Core.PropertyDictionary.ExpandProperties(String input, Location location, Hashtable state, Stack visiting) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\PropertyDictionary.cs:line 285 at NAnt.Core.PropertyDictionary.ExpandProperties(String input, Location location) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\PropertyDictionary.cs:line 253 at NAnt.Core.AttributeConfigurator.InitializeAttribute(PropertyInfo propertyInfo) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 696 at NAnt.Core.AttributeConfigurator.Initialize() in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 573 at NAnt.Core.Element.InitializeXml(XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 310 at NAnt.Core.Element.Initialize(XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 292 at NAnt.Core.Element.Initialize(XmlNode elementNode) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 215 at NAnt.Core.AttributeConfigurator.InitializeBuildElement(XmlNode childNode, Element buildElement, Type elementType) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 1152 at NAnt.Core.AttributeConfigurator.InitializeBuildElementCollection(PropertyInfo propertyInfo) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 966 at NAnt.Core.AttributeConfigurator.Initialize() in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 577 at NAnt.Core.Element.InitializeXml(XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 310 at NAnt.Core.Element.Initialize(XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 292 at NAnt.Core.Element.Initialize(XmlNode elementNode) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Element.cs:line 215 at NAnt.Core.Project.CreateTask(XmlNode taskNode, Target target) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Project.cs:line 1002 at NAnt.Core.Target.Execute() in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Target.cs:line 247 at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Project.cs:line 876 at NAnt.Core.Project.Execute() in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Project.cs:line 833 at NAnt.Core.Project.Run() in C:\Documents and Settings\drieseng\Local Settings\Temp\tmpA19.tmp\src\NAnt.Core\Project.cs:line 902 Total time: 0.1 seconds.