在c#.net中使用nant运行bat文件

在c#.net中使用nant运行bat文件,c#,.net,nant,C#,.net,Nant,我已经为ex(ex.bat)创建了一个批处理文件 是否可以通过nant c#.net代码运行批处理文件 问题1:我需要创建并将参数传递给通过ant生成的xml文件 问题2:我需要通过c#.net代码访问 等待您的宝贵意见 < target name="run-command"> < exec program="ConsoleTest.exe" basedir="${test.dir}"> < arg value="-cp" /> <

我已经为ex(ex.bat)创建了一个批处理文件

是否可以通过nant c#.net代码运行批处理文件

问题1:我需要创建并将参数传递给通过ant生成的xml文件

问题2:我需要通过c#.net代码访问

等待您的宝贵意见


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


可能的副本:@thilak我已经生成了您提供的xml文件!但是我需要通过c#code.net传递参数