开发者

How to run ant commands from C#?

I want开发者_运维问答 to excute ANT commands from C# application , may I use ExecuteCommandSync( ..) , to excute cmd commands, but I need to navigate inside project directory to execute some ant commands , how may I do that to navigate a directory path using C# to excute such commands

c:/dir1/testdir/myproject ant compile 


Look at the System.Diagnostics.Process class. It allows you to specify such things as WorkingDirectory and path to the executable (in the process.StartInfo property). It has an Exited event you can subscribe to in case you need to chain commands.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜