the included file also requires a top level <project> tag. The error you are seeing is an xml error since your file contains:
<property name="configuration" value="release" overwrite="false" /> <property /> ...
ie multiple elements at the top level - forming an invalid xml document.
try somthing like :
<?xml version="1.0"?> <project default="" > <property name="configuration" value="release" overwrite="false" /> <property /> ... </project>
Ian
Thomas Tomiczek wrote:
I jsut re-checked, and I am unable to find any type of bug.
Basically, when I plug the content of the include file into the main build file, it does work.
If I move it out into it's own separate file (and include it), I get errors.
This is the error:
C:\Work\ThonaConsulting\EntityBroker\02.1>nant NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005) Copyright (C) 2001-2005 Gerry Shaw http://nant.sourceforge.net
Buildfile: file:///C:/Work/ThonaConsulting/EntityBroker/02.1/default.build Target framework: Microsoft .NET Framework 1.1 Target(s) specified: build
BUILD FAILED
C:\Work\ThonaConsulting\EntityBroker\02.1\default.build(5,3): Could not include build file 'N:\.dev\deployed\.buildscripts\default.build'. There are multiple root elements. Line 3, position 3.
Total time: 0 seconds.
This is the main build file started:
<?xml version="1.0"?>
<project default="build" >
<include buildfile="N:\.dev\deployed\.buildscripts\default.build" />
</project>
And this is the start and end of the included file:
start:
<property name="configuration" value="release" overwrite="false" />
<property name="control.version" value="0.0" overwrite="false" /> <property name="control.release" value="0" overwrite="false" /> <property name="control.build" value="0" overwrite="false" /> <property name="control.smallversion" value="0.0.0" overwrite="false" />
end:
<!-- This target is publishing the build. Publication is the act of making the build available externally. Publication is performed through the "publish.build" script of the product. --> <target name="publish" depends="deploy"> <if test="${file::exists(nant.project.basedir+'\publish.build')}"> <echo message="External build file found, executing" /> <nant buildfile="${nant.project.basedir+'\publish.build'}" /> </if> </target>
(naturally the start and end parts are not working on their own).
The interesting thing is that if I basically copy/paste the include file into the main build file, replacing the <include element, then suddenly all things are working.
Thomas
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ryan Davis
Sent: Mittwoch, 11. Mai 2005 16:43
To: nant-users@lists.sourceforge.net
Subject: RE: [Nant-users] <include element - help...
Looks like it might be a bug in your included build file.
This is exactly what I do, except I have the project's build
files setting a lot of properties, and the master build file makes all
its decisions based on those properties. I'm not sure how overriding targets would even work.
Thanks,
Ryan
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas
Tomiczek
Sent: Wednesday, May 11, 2005 10:36 AM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] <include element - help...
Hello, I am trying to get into orgainizing my nant files more. I have a central nant file that all our projects should share. Is it viable to use an empty shell file (possibly with
do-nothing targets that the projects fill out) and have it include the
core targets?
How is the syntax? I just took the whole XML content to the external file, and did
remove project tag. The new build file tries to include this: <?xml version="1.0"?> <project default="build" > <include
buildfile="n:\.dev\deployed\.buildscripts\default.build" /> </project> Sadly I get an exception? C:\Work\ThonaConsulting\EntityBroker\02.1>nant NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005) Copyright (C) 2001-2005 Gerry Shaw http://nant.sourceforge.net <http://nant.sourceforge.net> [loadtasks] Failure scanning \"C:\Program
Files\Thona.Nant\NAnt.NUnit1Tasks.dll\ " for extensions. One or more of the types in the assembly
unable to load. Buildfile:
file:///C:/Work/ThonaConsulting/EntityBroker/02.1/default.build
<file:///C:\Work\ThonaConsulting\EntityBroker\02.1\default.build> Target framework: Microsoft .NET Framework 1.1 Target(s) specified: build BUILD FAILED C:\Work\ThonaConsulting\EntityBroker\02.1\default.build(5,2): Could not include build file
'n:\.dev\deployed\.buildscripts\default.build'. There are multiple root elements. Line 3, position 3. Total time: 0 seconds. The documentation for the Nant <include> task is - well - not
really helpfull. Thoms
------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users