question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stuck forever loading dlls in VS Code when starting C# app

See original GitHub issue

Environment 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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Nov 27, 2019

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?

0reactions
massimilianokrauscommented, Nov 28, 2019

Yes, with dotnet run the console doesn’t write anything, like it’s blocked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - what is "Loading symbols" and why does it take so long ...
Most of this time seems to be "Loading symbols for reference X.Y.Z.dll". Each of my around 30 references takes about a second to...
Read more >
Debug loading Dlls extremely slow - MSDN - Microsoft
After I do any code change to my solution and start debugging the application takes several minutes to start. I have experienced this...
Read more >
VS hangs during loading symbols - Visual Studio Feedback
When I try to debug a solution, VS tries to load the PDBs for my DLLs, but always stops and goes into a...
Read more >
Fix IIS website hangs and slow loads - LeanSentry
In this guide, I will show you how to troubleshoot an IIS or ASP.NET website hang in production ...
Read more >
Assembly Reload Freezing problem - Unity Forum
If you are using a native DLL with pinvoke, it cannot be unloaded. ... for example because it is executing unmanaged code, or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found