After a decent amount of effort on our project we have finally setup a standard build script for all of our projects, which is a great thing. But when I was converting on of my projects over to the new format I ran into some odd behavior and it was only happing on my box, not others.
Here is more details:
We have setup our build process so that it each build machine/developer can have their own local properties file (see JP’s post for more details). This properties file allow each developer to setup their own environment settings (database, etc) and these settings will be consumed by the main build file. We are doing this by utilizing
When I was setting up my new file I kept running into an issue because my properties file was not being consumed correctly. I knew the file existed (I echo’ed the path and wrapped it in an ‘if’ statement) and could not understand why it was not being consumed. Because I knew it was working on another box (build box) I decided to take a look at that file vs my file. Right away I found the difference, can you see the difference.
File that did NOT work
<project name="XXX" xmlns="http://nant.sf.net/release/0.85/nant.xsd">
File that did work
Now why in the hell would the addition of the xmlns make it so my file did not work but the file without it did…. hum. Turns out the issue was not the addition of the xmlns in my file, but the lack of xmlns on the main file. So not having a namespace defined on the parent, but having one defined on the child is an issue. However, nant will NOT tell there is an issue (bad Nant) it simply skips your action.
So if you are trying to include a file into your Nant build script make sure that either ALL your scripts have namespaces, or NONE of your scripts have them.
Till next time,
05-14-2009 1:36 PM