【问题标题】:using nant to run a bat file in c#.net使用 nant 在 c#.net 中运行 bat 文件
【发布时间】:2012-08-24 19:28:52
【问题描述】:

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

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

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

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

等待您宝贵的cmets

【问题讨论】:

标签: c# .net nant


【解决方案1】:
< 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

来自answer

【讨论】:

  • @thilak 我已经生成了您提供的 xml 文件!但我需要通过 c# 代码.net 传递参数
猜你喜欢
  • 2018-05-02
  • 2012-03-08
  • 2019-01-20
  • 2018-09-07
  • 1970-01-01
  • 2017-10-30
  • 1970-01-01
  • 2012-04-30
  • 1970-01-01
相关资源
最近更新 更多