是否有编写自定义楠,蚂蚁,或MSBuild任务的最佳做法? [英] Are There Any Best Practices for Writing Custom NAnt, Ant, or MSBuild tasks?

查看:142
本文介绍了是否有编写自定义楠,蚂蚁,或MSBuild任务的最佳做法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写恶性自定义任务的过程。我一直立足我怎么写code根据一些例子,我在互联网上找到,并通过观察一些其他任务为楠和Ant源。

I'm in the process of writing a custom task for NAnt. I've been basing how I write the code based on some examples I've found on the Internet and by looking at the source of some other tasks for both NAnt and Ant.

有了这样说,是否有良好的写作任务构建管理者像楠,蚂蚁,或任何的MSBuild准则或最佳做法?我在异常处理和模块化方面寻找这样(即,如果我的任务做一些事的文件结构,我应该删除并重新创建我的任务的输出文件/目录或备份它不知何故,等等)。

With that being said, are there any guidelines or best practices for writing good tasks for build managers like NAnt, Ant, or MSBuild? I'm looking for such in terms of exception handling and modularity (i.e. if my task does something with the file structure should I delete and recreate the output file/directory of my task or back it up somehow, etc.).

编辑:我在寻找定制任务创建的指导方针。如果我想创建自己的任务NUnit的或硒或编译F#(我知道他们已经存在,但只是说,这些任务不是在大多数构建管理人员原有的核心),什么都在写我自己的任务的一些最佳实践。我有一个构建文件没有问题。只看指导编写新的编译工作。

I'm looking for guidelines on custom task creation. If I wanted to create my own task for NUnit or Selenium or to compile F# (I know they already exists but just saying that these are tasks not in the original core of most build managers), what are some best practices on writing my own task. I have no issues with build files. Just looking at guidance for writing new compiled tasks.

感谢

推荐答案

有关的MSBuild我已经写了2篇文章,可能会帮助你。

For MSBuild I have written 2 articles that may help you.

的MSBuild:最佳实践创建可靠的构建,第1部分

的MSBuild:最佳实践创建可靠的构建,第2部分

赛义德·易卜拉欣·哈希米

Sayed Ibrahim Hashimi

我的书:里面的微软构建引擎:使用的MSBuild和团队基础建设

这篇关于是否有编写自定义楠,蚂蚁,或MSBuild任务的最佳做法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆