Stuck forever loading dlls in VS Code when starting C# app
See original GitHub issueEnvironment data
dotnet --info
output: Version: 3.0.101; Commit: bc5f8df0f5
VS Code version: 1.40.2
C# Extension version: 1.21.8
OS: macOS Catalina, version: 10.15.1
Steps to reproduce
Create a new web app with dotnet new mvc -n WebApp
.
Accept to create build and debug assets.
Debug the application
Expected behavior
All the dlls load and the app runs.
Actual behavior
The dll loading process stops after loading System.Threading.Timer.dll, and it remains stuck forever. If I stop the debug session, more processes “dotnet” remain dead in the background. Sometimes it unblocks after some minutes. Sometimes it just works as expected. Sometimes it’s freezing for some seconds right after the UserSecrets.dll is loaded.
Additional Infos
This had never happened until a month ago. This started to happen while I had .NET Core 2.2, and keeps happening with .NET Core 3.0.100 and 3.0.101.
I tried to downgrade the C# extension down to version 1.17, but nothing changes, there is still this unpredictable random freezing on dll loading.
If I execute dotnet run -v d
, the logs stop on this line:
“Using launch settings from /Users/mk/Desktop/Boh2/Properties/launchSettings.json…”
I have such file, with the default configuration.
The problem is present only for web/mvc apps. Simple console apps are runnable and debuggable without any issue.
I didn’t configure particular paths in the launch.json file.
“Just my code” is enabled.
If I hit “pause” during the System.Threading.Timer.dll loading, VS Code highlights a row inside the Program.BuildWebHost()
method. If I click “continue”, I can’t see any additional useful debug info, the loading process is still stuck.
When the startup is stuck on Microsoft.Extensions.Configuration.UserSecrets.dll, instead, and I hit “pause”, the highlighted row is inside the Startup’s constructor, on configurationBuilder.Build()
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thanks. In this case, this is the wrong place for this issue - sounds like you are having an issue with the ASP.NET Core runtime. I am not sure what would be the right place for this issue. Maybe https://github.com/aspnet/aspnetcore/issues?
Yes, with
dotnet run
the console doesn’t write anything, like it’s blocked.