If your Visual Studio builds are taking forever, there’s a game-changing setting most developers miss entirely.
The Problem: By default, Visual Studio uses only ONE CPU core for parallel project builds, even if you have 8, 16, or more cores available. This bottleneck can turn a 30-second build into a 2-minute nightmare.
The Solution:
Tools → Options → Projects and Solutions → Build and Run
Set "maximum number of parallel project builds" to: Number of CPU cores - 1
Why This Works:
MSBuild can compile independent projects simultaneously. If your solution has 10 projects and 8 cores, instead of building them sequentially (project by project), MSBuild builds 7 projects at once. The math is simple: 10 projects ÷ 7 parallel builds ≈ 43% faster than sequential building.
Real Example:
// Before: 120 seconds build time
Solution with 15 projects, 1 parallel build
// After: 48 seconds build time
Solution with 15 projects, 7 parallel builds (on 8-core CPU)
60% reduction!
Pro Tip: Leave one core free (cores – 1) so your system stays responsive during builds. If you set it equal to your core count, Visual Studio might freeze your entire machine during large builds.
Bonus Hack: Add this to your .csproj files to skip unnecessary file copies:
<PropertyGroup>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
</PropertyGroup>
This prevents MSBuild from copying assembly lock files to output directories, saving precious I/O time on every build.
