将默认的 Nant 任务替换为不同的任务

发布于 2024-09-28 14:33:31 字数 231 浏览 0 评论 0原文

我想从 Nant 重新定义复制任务,而不更改我的 .build 配置文件。在南特可以吗?

Msbuild 有:

<UsingTask TaskName="SGen" AssemblyFile="Tools\Extensions.dll"/>

可以做到这一点。

我编写了我的复制任务,因为不知道如何在 nant 脚本执行期间全局覆盖它。

I want to redefine copy task from Nant without changing my .build configuration files. Is it possible in nant?

Msbuild has:

<UsingTask TaskName="SGen" AssemblyFile="Tools\Extensions.dll"/>

which can do that.

I wrote my copy task by don't know how to override it globally during nant script execution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

就此别过 2024-10-05 14:33:31

我不知道南特有类似的事情。 Nant 可以通过 nant 任务 调用其他 nant 脚本。您可以编写一个小的 nant 构建文件,其中包含不同的复制方法,并在您想要进行复制时调用它。使用属性以及 ifunless 属性来选择所需的复制实现。

I'm not aware of anything like that in nant. Nant can call other nant scripts via the nant task. You could write a little nant build file with your different copy methods in it and call out to it whenever you want to do a copy. Use a property and the if and unless attributes to select which copy implementation you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文