NAnt development tips
Here are some Tips which might help you when debugging NAnt scripts.
1. Remember to update NAnt Framework tag if you are working with new version of .Net framework in Nant.exe.config file.
I upgraded our system to .Net 3.5 and started coding. But when I checked in the files the nant build broke. I was racking my head for a while before I figured out that Nant was building for framework 2.0 and hence the new features which I coded against did not compile.
2. if you create new targets remember to add it in the 'depends' attribute of the 'build' target.
I included a new component in my NAnt build script. I included the target for getting the latest file from sourcesafe and another target for building the file.
When I ran the build script, it did not call the new targets. I figured out that I had not updated the 'depends' attribute of the build target task.
Ex:
3. I use 'NantBuilder' tool which helped me in running specific targets and debugging it.
1. Remember to update NAnt Framework tag if you are working with new version of .Net framework
I upgraded our system to .Net 3.5 and started coding. But when I checked in the files the nant build broke. I was racking my head for a while before I figured out that Nant was building for framework 2.0 and hence the new features which I coded against did not compile.
2. if you create new targets
I included a new component in my NAnt build script. I included the target for getting the latest file from sourcesafe and another target for building the file.
When I ran the build script, it did not call the new targets. I figured out that I had not updated the 'depends' attribute of the build target task.
Ex:
3. I use 'NantBuilder' tool which helped me in running specific targets and debugging it.
Comments
Ron