What to Do When Visual Studio Debugger Won’t Attach to Docker

I use Docker since months to developpe ASP.Net Core applications. It’s really something to work with this kind of technologies.

But sometime, a glitch come around and drive you crazy (just a little bit, not more). Docker was running fine and you update your Nuget’s packages (because it’s a good thing to keep ours dependencies up-to-date). And now, Visual Studio start to yell at you that kind of error:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use Microsoft.NETCoreApp 1.0.0 or newer. This may be expected if the target process did not run .NET code.

Like said the book « Don’t Panic! »

Two step to check.

First, in one of your project.json (if you use it), check if in the dependency you have the right syntax for Microsoft.NETCore.App, like below

"Microsoft.NETCore.App": {
"version": "1.1.1",
"type": "platform"

Second step, reset to factory defaults your Docker setup, like explain in this post https://dzone.com/articles/what-to-do-when-visual-studio-2017-debugger-wont-a (Yes I’m lazy, I use the same title with no shame ;) ).

If this two steps don’t resolve your problem, now you panic…

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *


Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.