Search code examples
c#.netnant

using nant to run a bat file in c#.net


I have created a batch file for ex(ex.bat)

Is it possible to run batch file through nant c#.net code

Problem 1: i need to create pass the arguments to that xml file generated through ant

problem 2: i need to access through c# .net code

Waiting for your valuable comments


Solution

  • < target name="run-command">
       < exec program="ConsoleTest.exe" basedir="${test.dir}">
         < arg value="-cp" />
       < /exec>
     < /target>
    

    http://nant.sourceforge.net/release/latest/help/tasks/exec.html

    from the answer