Visual Studio 2010, how to build projects in parallel on multicore

后端 未结 5 1741
暖寄归人
暖寄归人 2020-12-13 07:32

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

5条回答
  •  醉梦人生
    2020-12-13 08:15

    You could launch the build in MSBuild in parallel by :

    • Setting the attribute BuildInParallel of MSBuild task to true

      
        
        
      
      
    • Or calling msbuild with the parameter /maxcpucount:X where X specifies the number of worker processes that are involved in the build. This solution better suits your need.

      msbuild [YourSolutionFile.sln] /maxcpucount:4 /p:Platform=AnyCpu;Configuration=Debug;
      

    Scott Hanselman wrote a post on that, if you want to integrate (kinda) the process into Visual studio as an external tool.


    For C++ projects you could configure multiprocessor build directly in Visual Studio :

    Tools | Options | Projects and Solutions | Build and Run

提交回复
热议问题