是否可以通过编程方式与 Nant 构建进行交互?
我的反射器试验刚刚结束:(所以我现在无法真正检查程序集,所以我想知道是否有任何方法可以从.net以编程方式与nant文件进行交互。
我基本上希望能够以编程方式执行以下操作:
- 查看所有构建任务
- 运行构建任务
- 读取任务的输出(理想情况下在某些模型中,但我猜在字符串中是可以接受的)
我确信当您通过命令行运行它时,Nant 可以在内部执行此操作,但想知道如果有人能给我如何在 .net 中执行此操作的快速片段(如果可能)
My reflector trial has just ran out :( so I cannot really check the assembly at the moment, so I was wondering if there is any way to interact with nant files progmatically from .net.
I basically want to be able to do the following progmatically:
- See all build tasks
- Run a build task
- Read the output of the task (ideally in some model, but in a string would be acceptable I guess)
I am sure Nant can do this internally when you run it though the command line but was wondering if anyone could give me a quick snippet of how to do this within .net (if it is possible)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 NAntMenu;它是一个用 C# 代码编写的开源实用程序。
http://nantmenu.codeplex.com/
NAntMenu.Core.dll 包含用于解析 nant 文件、枚举所有构建目标并执行目标的代码。执行时,它使用 NAntMenu.Logger.dll 来记录输出。
Check out NAntMenu; it's an open source utility written in c# code.
http://nantmenu.codeplex.com/
NAntMenu.Core.dll contains code to parse a nant file, enumerating all build targets, and execute a target. When executing, it uses NAntMenu.Logger.dll to log the output.