NAnt 上的并行任务执行

发布于 2024-10-21 08:26:27 字数 342 浏览 5 评论 0原文

我正在使用 NAnt 以不同的配置为同一软件构建 5 个不同的安装程序包。这些任务可以并行化,因为它们彼此不依赖。构建这些配置的 Installshield 在多核 CPU 使用方面似乎效率低下(4 核机器上的 CPU 使用率上限为 25%)。我一直在寻找一种简单的方法来并行化任务,只找到了这个,这几乎是我需要什么。然而,该项目的源代码不可用,并且它引用了一些在最新版本的 NAnt 0.91 中不可用的类型,而我们需要 .NET 4.0 支持。

除了编写我自己的 NAnt 扩展之外,还有什么解决这个问题的想法吗?

I am using NAnt to build 5 different installer packages for the same software, in different configurations. These tasks can be parallelized as they are not dependent on each other. Installshield which is building these configuration seems inefficient with regards to multi core CPU usage (the usage capped at 25% CPU on a 4 core machine). I have been looking for an easy way to parallize tasks and only found this, which is pretty much what I need. However the source code for this project is not available and it's referencing some types which are not available in the latest version of NAnt 0.91 which we require for .NET 4.0 support.

Any ideas on how to solve this, short of writing my own extension for NAnt?

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

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

发布评论

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

评论(4

似狗非友 2024-10-28 08:26:28

老实说,这并不是特别困难,但我不知道有任何其他现成的项目或 NAnt 贡献任务可以做到这一点。因此,您唯一的选择几乎就是编写自己的并行任务实现。也就是说,由于这个人提供了已编译的程序集,因此您可以随时在 Reflector 中查看它们并了解总体思路,如果您明白我的意思的话:)

This isn't particularly difficult quite honestly, but I don't know of any other ready-made project or contrib task for NAnt that will do it. So your only option is pretty much to write your own parallel task implementation. That said, since the guy provides compiled assemblies, you could always give them a look-see in Reflector and get the general idea, if you know what I mean :)

作业与我同在 2024-10-28 08:26:28

看看 https://github.com/NAntCrossCompile/NAnt.Parallel
有一个正在开发的插件,它允许基于文件、文件夹、字符串集并行执行任务......

Have a look at https://github.com/NAntCrossCompile/NAnt.Parallel
There is a plugin in development which allows the parallel execution of tasks based on sets of files, folders, strings...

我也只是我 2024-10-28 08:26:27

I actually found the source code by writing to the author. It's now a part of a project colled CIFactory and the source code can be accessed through the project homepage. With a few modifications I was able to get it running on the latest NAnt version. I will publish it when I work out a few kinks, mostly regarding where the output is streamed to.

何必那么矫情 2024-10-28 08:26:27

如果您回头查看该页面,请在评论中进一步查看
源代码链接

源代码可用。 '当然反射器会用正确的插件拆卸......

If you look back on the page, further down in the comments
Links to source code

The source is available. 'course reflector would dissassemble with the right plugin...

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