How to decrease MSBuild times

后端 未结 4 1243
温柔的废话
温柔的废话 2021-01-31 10:22

My situation

In the C# project I am now working on we have a fairly big solution (80+ projects). Now rebuild times of 5 minutes+ are really becoming qui

4条回答
  •  难免孤独
    2021-01-31 11:05

    MSBuild build time is a multi-dimensional problem. The good news that it is easy to solve:

    Unlike most of the processes running on the build machine, build processes are notorious for being CPU, RAM and I/O -consuming. A general recipe for speeding up MSBuild builds is "get best machine money can buy", particularly:

    1. CPU - at least two Intel 3.0 GHz Core 2 Duo.

    2. RAM - at least 4 GB DDR3. If this is a developer and build machine, a 64-bit OS and 8 GB RAM is a better option.

    3. HDD - The fastest options is a high-end 3ware RAID-1 with an on-board battery and an enabled write cache. A fast SSD may be another option to consider.

    4. Network - minimum 1 Gbit/s card.

    This simple hardware optimization can speed up your MSBuilds 2-3 times.

提交回复
热议问题