views:

44

answers:

1

I am working on a prototype project and need to put a new layer of abstraction over my existing NAnt scripts, for which I'd like to use .Net, possibly even WPF.

What I have at present is a NAnt script which I call from a Command window (a DOS box, for the old-skoolers).

As I said, I'd like to wrap this inside a WPF application that I can customise and make look a like nicer, and prevent the need for the user to access my scripts via the Command window.

But it's how I call the NAant scripts within a .Net application - any ideas?

+2  A: 

Use the System.Diagnostics.Process class.

HTH, Kent

Kent Boogaart
Basicly use that class to start the nant executable and provide it with the right parameters like you would from the command window. You can use the same class to capture any output the process makes. Or use the nant log file.
Lars Truijens