The target process exited without raising CoreCLR started event error with .NET Core 2.2
Solution 1
I had the same issue.
I ran Program.cs file from the command line and the error message was different.
So, apparently, I didn't have the appropriate .NET Core runtime installed.
You can download it by the following link - https://dotnet.microsoft.com/download
Solution 2
I was facing the same issue!
I updated my Visual Studios to the most recent via the VS Installer.
While updating, I also added the following VS Workloads:
- ASP.NET and web development
- .NET desktop development
See about workloads here:
https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/install/modify-visual-studio.md
This worked for me! 😊
I did not have to downgrade or remove anything
Solution 3
I had to do a "clean" and "rebuild" of the project and after that it worked again.
Solution 4
I ran with the same problem. But for me it was that my project was running in .NET Core 2.2, which I didn't have installed. I'm using VS 2019.
So for the solution, just go to Visual Studio Installer and for your VS 2019 hit "Modify" like in the following image (it's in spanish though):
Then, click "Individual Components", like
And then, make sure you checked in ".NET Core 2.2 Runtime (EOL)" (and above like .NET Core 3.0, if you want) and click "Modify", as shown
Hope this works for you.
Solution 5
In my case, switching to x64 save the day.
michasaucer
Updated on July 08, 2022Comments
-
michasaucer almost 2 years
I want to debug an empty WebApi Project based on .NET Core 2.2.
I installed the "Core 2.2 SDK x86" and changed the target framework to 2.2:
<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> </PropertyGroup>
When I started to debug this project, IIS starts, but in the route
api/values
I see nothing (it loads forever) and I get this error:The target process exited without raising a CoreCLR started event.Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core
In my solution WPF and Class Library projects exist. I wanted to make a WebApi for it. Like I said, it's an empty base project generated by Visual Studio 2019. I just installed Core 2.2. Why do I get that error and what am I doing wrong?
-
Arnaud VdP about 5 yearsDid you create the project from the "ASP.NET Core Web Application" Template?
-
michasaucer about 5 yearsYes, i create from Core's
WebApi
-
michasaucer about 5 yearsFor now i downgraded my proj to
2.1
-
Edward about 5 yearsTo check whether it is related with this solution, please try to create a new web api .net core 2.2 project, will it work? Try to run command
dotnet --list-sdks
anddotnet --list-runtimes
and share us the result. -
Dylan Nicholson over 4 yearsHaving this issue too, and I never upgraded to 2.2. None of the below suggestions have worked so far.
-
vivek nuna over 2 yearsI am getting this error when I run the project from other drives, it works as expected from the C drive.
-
-
michasaucer about 5 yearswhat version of VS do you use?
-
Nazariy Perepichka about 5 yearsI encountered this problem with VS19
-
Andrei Hardau almost 5 yearsindeed upgrading net core to 2.2.300 solved this; I was using vs 2019
-
Modern Ronin almost 5 yearsthis is really the way to get a detailed reason - my case I didn't have 2.2.301.
-
Jeremy Caney over 4 yearsHey @Bazil, welcome to Stack Overflow. This is useful information for someone who doesn't have the .NET Core 2.2 Runtime installed. That said, it's worth noting that in the OP's case, at least, they had already installed the .NET Core 2.2 SDK, which includes the .NET Core 2.2 Runtime.
-
shA.t about 4 yearsI recommend this way, when you see a warning message about Not using this version of this package; ;).
-
mfcallahan about 3 yearsThis also fixes the issue for me, is anyone able to explain the "why?"
-
JWP over 2 yearsUpdate: 08/30/2021 Microsoft.NET.Test.Sdk V16.11.0 has worked in first test today.
-
Dayán Ruiz over 2 yearsThis worked for me, just wen to the microsoft page, downloaded and installed the 2.2 net core version sdk and restarted visual studio, now works like a charm.
-
vivek nuna over 2 years@NazariyPerepichka I am getting this error when I run the project from other drives, it works as expected from the C drive.
-
vivek nuna over 2 yearsI am getting this error when I run the project from other drives, it works as expected from the C drive.
-
vivek nuna over 2 yearsI am getting this error when I run the project from other drives, it works as expected from the C drive.
-
Enrico over 2 years@vivek nuna did you move the solution after you first created it?
-
vivek nuna over 2 yearsI haven’t moved
-
Birol İnci over 2 yearsYes. It worked. Thanks
-
Axel Andersen over 2 yearsI had .NET desktop and added ASP.NET and then it worked
-
René AD about 2 yearsSolved my problem, thought in my case it was .net 7 which was missing.
-
Onur Dikmen almost 2 yearsThank you, I had the same problem, SDK 2.2.207 is not installed in vs2022. you can also go with the VS2022 modified meat. From here, you can upload the missing content (sdk, not supported contenct) by clicking the "individual component".