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
2023-01-24T11:56:16.52+00:00

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.

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

3 answers

Sort by: Most helpful
  1. Faisal suleman 10 Reputation points
    2023-02-15T11:17:04.7966667+00:00

    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
    2023-01-26T17:00:25.0666667+00:00

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


  3. Bruce (SqlWork.com) 55,686 Reputation points
    2023-01-26T17:11:12.6666667+00:00

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