Why did my C# build time suddenly increase from seconds to 20+ minutes?
Asked by
bloom-filter
My C# project built in a few seconds yesterday, but today the same build takes more than 20 minutes. Even cancelling the build takes several minutes. I've already tried restarting my computer and switching back to older code, but nothing has helped. What should I check to find the cause?
Answers
Check for resource problems first. A nearly full drive, low available memory, disk errors, or a process consuming system resources can make both building and cancelling extremely slow.
Reply to this answer
There isnโt enough information to identify one specific cause. The IDE, build tool, project type, operating system, build output, and system behavior during the build would all help narrow it down. Check the build logs for the step that is hanging and see whether CPU, memory, disk, or network usage spikes.
Reply to this answer
The build may depend on an external resource such as package feeds, source control, network shares, or another web service. If one of those is slow or unreachable, the build can appear frozen. The detailed build log should show whether it is waiting on a restore, download, or external command.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions