Visual Studio Build Very Slow

前端 未结 20 1610
别那么骄傲
别那么骄傲 2020-12-12 10:59

This applies to both 2008 and 2010 versions (and probably earlier ones too). Also to both C++ and C# projects.

An initial build (after reboot) runs at normal speed

20条回答
  •  生来不讨喜
    2020-12-12 11:50

    One of the reasons, is Visual Studio keeps rebuilding the same dependent project(s) over and over although nothing has changed. Imagine a Solution having tons of Projects that keep being built for no apparent reason. This wastes HUGE time...

    The main solution to this is to revise each "Copy to Output Directory" where it's set to "Always". Change that to "Copy if newer".

    It might help to see detailed build log. Open Tools > Options > "Projects and Solutions" > "Build and Run". Now set "MSBuild project build output verbosity" to "Diagnostic"

    For more info, this thread discusses this specific point

提交回复
热议问题