Are There Any Best Practices for Writing Custom NAnt, Ant, or MSBuild tasks?
Asked Answered
S

2

3

I'm in the process of writing a custom task for NAnt. I've been basing how I write the code based on some examples I've found on the Internet and by looking at the source of some other tasks for both NAnt and Ant.

With that being said, are there any guidelines or best practices for writing good tasks for build managers like NAnt, Ant, or MSBuild? I'm looking for such in terms of exception handling and modularity (i.e. if my task does something with the file structure should I delete and recreate the output file/directory of my task or back it up somehow, etc.).

EDIT: I'm looking for guidelines on custom task creation. If I wanted to create my own task for NUnit or Selenium or to compile F# (I know they already exists but just saying that these are tasks not in the original core of most build managers), what are some best practices on writing my own task. I have no issues with build files. Just looking at guidance for writing new compiled tasks.

Thanks

Sashasashay answered 19/5, 2009 at 11:49 Comment(0)
S
0

Basically you could split files and include them as reference in on file,so you can manage them better.

Spriggs answered 19/5, 2009 at 12:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.