Visual Studio 2010,如何在多核上并行构建项目 [英] Visual Studio 2010, how to build projects in parallel on multicore

查看:193
本文介绍了Visual Studio 2010,如何在多核上并行构建项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有40多个项目的大型解决方案.其中几乎一半是测试项目. 在我的项目中,我们同时使用了代码合同,代码分析和样式分析. 我希望能够构建不并行依赖于我的四核CPU的项目.

I have a big solution with more than 40 projects. Almost half of them are test projects. In my project we use both Code Contracts, Code Analysis, Style Analysis. I want to be able to build the projects that are not dependent in parallel on my quad core CPU.

如何设置msbuild来并行构建项目?

How can I setup msbuild to build the projects in parallel?

推荐答案

在Visual Studio中:工具|选项|项目和解决方案|生成并运行.这应该默认为您的CPU数量.

In Visual Studio: Tools | Options | Projects and Solutions | Build and Run. This should default to your CPU count.

从命令行:msbuild /maxcpucount[:n](如果未指定n,则它将使用CPU计数).

From the command line: msbuild /maxcpucount[:n] (is n is not specified, then it will use the CPU count).

这篇关于Visual Studio 2010,如何在多核上并行构建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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