Parallel task execution on NAnt

烂漫一生 提交于 2019-12-06 05:35:30

问题


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?


回答1:


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.




回答2:


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...




回答3:


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 :)




回答4:


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...



来源:https://stackoverflow.com/questions/5258979/parallel-task-execution-on-nant

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!