How to fix "The target process exited without raising as 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"

Faisal suleman 10 Reputation points

User's image

My application console application is build on .net core 7 and gave error when running on docker container, several other console applications running properly but one gave problem. Docker container logs given below:
User's image

Targer OS is linux. I have tried delete docker image, tried delete project and create new problem still retain. Please note that other console applications developed on .net core 7 running properly the new one gave problem that recently added.

A set of technologies in the .NET Framework for building web applications and XML web services.
4,023 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Faisal suleman 10 Reputation points

    User's image

    The above error is generic error the original one is inside the output window of visual studio when this prompt occurred.
    By the way this was because of runtime in my docker file but there should be aspnet "red underlined" below image.
    User's image

    2 people found this answer helpful.

  2. Laura Mateus 0 Reputation points

    I'm also getting the same error. Any suggestion? ThanksUser's image

  3. Bruce ( 52,826 Reputation points

    I would guess you are pulling a docker container without the core runtime installed. show your docker file