Visual studio unable to attach to coreCLR. access is denied
Asked Answered
C

2

11

I have created a console app in Dot.net Core 2.0 and when I run the I am getting Unable to attach to CoreCLR. access is denied

enter image description here

I have tried, cleaning, deleting files in bin and obj and also tried running under 86x, but could not find any fix for this problem.

Caldera answered 15/10, 2018 at 12:51 Comment(0)
C
2

I was able to solve this problem by installing the newer version of Dot.Net which is right now 2.1, in your case it could be different in future. enter image description here

You can check newer stable version On Official Microsoft Site for Dot.net core here

and Original Post check

Caldera answered 15/10, 2018 at 13:21 Comment(0)
O
31

In my case (for .net6) I had to change project file from:

<PublishSingleFile>true</PublishSingleFile>

To

<PublishSingleFile Condition="'$(Configuration)' == 'Release'">true</PublishSingleFile>

Apparently debuger cant handle single exe file.

Obstetrician answered 12/1, 2022 at 14:35 Comment(2)
Great. This solved the "Unable to attach to CoreCLR. The debugger’s protocol is incompatible with the debuggee" error as well. Thank you!Thermostatics
Attention JetBrains Rider devs: Rider fails silently for this issue. I didn't see the error message until I loaded VS2022 Community.Oberhausen
C
2

I was able to solve this problem by installing the newer version of Dot.Net which is right now 2.1, in your case it could be different in future. enter image description here

You can check newer stable version On Official Microsoft Site for Dot.net core here

and Original Post check

Caldera answered 15/10, 2018 at 13:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.