Sporadic MSBuild hangs with managed git + .NET 5.0
See original GitHub issueI’m seeing sporadic hangs in MSBuild when using Nerdbank.GitVersioning 3.4.142-alpha with .NET SDK 5.0.100:
Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Attempting to cancel the build...
/Users/vagrant/.nuget/packages/nerdbank.gitversioning/3.4.142-alpha/build/Nerdbank.GitVersioning.Inner.targets(17,5): warning MSB4220: Waiting for the currently executing task "Nerdbank.GitVersioning.Tasks.GetBuildVersion" to cancel.
/Users/vagrant/.nuget/packages/nerdbank.gitversioning/3.4.142-alpha/build/Nerdbank.GitVersioning.Inner.targets(17,5): warning MSB4220: Waiting for the currently executing task "Nerdbank.GitVersioning.Tasks.GetBuildVersion" to cancel.
/Users/vagrant/.nuget/packages/nerdbank.gitversioning/3.4.142-alpha/build/Nerdbank.GitVersioning.Inner.targets(17,5): warning MSB4220: Waiting for the currently executing task "Nerdbank.GitVersioning.Tasks.GetBuildVersion" to cancel.
/Users/vagrant/.nuget/packages/nerdbank.gitversioning/3.4.142-alpha/build/Nerdbank.GitVersioning.Inner.targets(17,5): warning MSB4220: Waiting for the currently executing task "Nerdbank.GitVersioning.Tasks.GetBuildVersion" to cancel.
I’ve observed the hang on macOS and Windows, I have not (yet) observed it on Linux.
The issue appears to be specific to .NET 5.0; I have not seen it when using .NET SDK 3.1.404.
I didn’t find the time to dig deeper yet, but thought I’d be worth sharing the info nonetheless.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
msbuild (link.exe) hangs inside container
When building a solution with MSBuild tools (inside a windowsservercore container) the linker processes seem to hang forever.
Read more >Troubleshoot pipeline runs - Azure DevOps
If you are experiencing intermittent or inconsistent MSBuild failures, try instructing MSBuild to use a single-process only. Intermittent or ...
Read more >Visual Studion 2022 Version 17.6 Hangs on Build\Clean ...
I have the same problem with VS 17.6.5, but it started sometime this spring. Don't know the exact version or date, because it...
Read more >Known Issues | TeamCity On-Premises Documentation
These problems include errors running tests headless, issues with the interaction of the TeamCity agent with the Windows desktop, and so on.
Read more >Csc.exe hanging while building code
First thing I would do is check all running processes and close suspicious ones. Then check the Build order.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
LGTM on GitHub Action (ubuntu-latest) and Azure DevOps (windows-2019)! Also there is no speed difference (everything within the daily fluctuations).
Thanks! 🎉
@BenjaminAbt #542 fixes this for me. Could you give that version a try and let me know if it works for you? The build on the PR contains a pre-build NuGet package in the deployables artifact.