The target process exited without raising CoreCLR started event error with .NET Core 2.2

76,497

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): See image here

Then, click "Individual Components", like here.

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 here

Hope this works for you.

Solution 5

In my case, switching to x64 save the day. enter image description here

Share:
76,497
michasaucer
Author by

michasaucer

Updated on July 08, 2022

Comments

  • michasaucer
    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
      Arnaud VdP about 5 years
      Did you create the project from the "ASP.NET Core Web Application" Template?
    • michasaucer
      michasaucer about 5 years
      Yes, i create from Core's WebApi
    • michasaucer
      michasaucer about 5 years
      For now i downgraded my proj to 2.1
    • Edward
      Edward about 5 years
      To 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 and dotnet --list-runtimes and share us the result.
    • Dylan Nicholson
      Dylan Nicholson over 4 years
      Having this issue too, and I never upgraded to 2.2. None of the below suggestions have worked so far.
    • vivek nuna
      vivek nuna over 2 years
      I am getting this error when I run the project from other drives, it works as expected from the C drive.
  • michasaucer
    michasaucer about 5 years
    what version of VS do you use?
  • Nazariy Perepichka
    Nazariy Perepichka about 5 years
    I encountered this problem with VS19
  • Andrei Hardau
    Andrei Hardau almost 5 years
    indeed upgrading net core to 2.2.300 solved this; I was using vs 2019
  • Modern Ronin
    Modern Ronin almost 5 years
    this is really the way to get a detailed reason - my case I didn't have 2.2.301.
  • Jeremy Caney
    Jeremy Caney over 4 years
    Hey @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
    shA.t about 4 years
    I recommend this way, when you see a warning message about Not using this version of this package; ;).
  • mfcallahan
    mfcallahan about 3 years
    This also fixes the issue for me, is anyone able to explain the "why?"
  • JWP
    JWP over 2 years
    Update: 08/30/2021 Microsoft.NET.Test.Sdk V16.11.0 has worked in first test today.
  • Dayán Ruiz
    Dayán Ruiz over 2 years
    This 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
    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
    vivek nuna over 2 years
    I am getting this error when I run the project from other drives, it works as expected from the C drive.
  • vivek nuna
    vivek nuna over 2 years
    I am getting this error when I run the project from other drives, it works as expected from the C drive.
  • Enrico
    Enrico over 2 years
    @vivek nuna did you move the solution after you first created it?
  • vivek nuna
    vivek nuna over 2 years
    I haven’t moved
  • Birol İnci
    Birol İnci over 2 years
    Yes. It worked. Thanks
  • Axel Andersen
    Axel Andersen over 2 years
    I had .NET desktop and added ASP.NET and then it worked
  • René AD
    René AD about 2 years
    Solved my problem, thought in my case it was .net 7 which was missing.
  • Onur Dikmen
    Onur Dikmen almost 2 years
    Thank 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".