Re: Getting the Path of an Included Build File

Bob Archer <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nant.user
Message-ID <[email protected]>
> I would like to create a common include file that several of my builds
> use.
> It would setup a few global directorise and properties. Then my build
> files
> would just use the <include> element. However, I am trying to use the
> project::get-buildfile-path() function inside my include file to get
> the
> current path of that include file. This property will then be used to
> build
> up other paths.
> 
> The problem is that this function returns the path to the build file
> including the include file. Since this method doesn't work, is there a
> better approach? Another function I should use?

It seems to me that the calling script knows the path to the included script since you are calling it. Set a property to hold the path which you can reference in the included script.

BOb

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.