How to fix Process with an Id of (Random number) is not running

Dhruvin lad 0 Reputation points
2025-01-17T18:58:22.0866667+00:00

Hi Team,

I have been stuck with an error "Process with an Id of (Random number) is not running"
and the number keeps on changing every single time.

This is what I get in my output window :The program '[17716] iisexpress.exe' has exited with code 0 (0x0).

were 11716 is a random number that changes everytime I run the application

I have tried multiple solution available.

1)Delete the .vs folder

2)Restart my IIS

3)Uninstalling and installing my visual studio 2022.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,053 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 56,271 Reputation points
    2025-01-17T19:40:22.5766667+00:00

    The number is the process ID. It is allocated by WIndows when a process starts and is used only once. Subsequent processes will have different PIDs. You can see the PID for processes in tools like Task Manager and Process Explorer.

    The message in the output window is common and not indicative of any issues. A process, including the debugger, can start other processes and they may close. Each one will generate a debugger output message letting you know this. You can actually disable this messaging by going to the Debugging options and then Output Window. Disable the output messages you don't care about such as Process Exit Message. These are just informational messages though.

    I'm confused where you're getting the message: "Process is not running". This has nothing to do with what is in the output window. Based upon your output window message the IISX process is shutting down probably when you stop the debugger. Note that some behavior is controlled by your VS settings. For example the Stop debugger when browser window is closed would control whether the debugger stops when you close the browser window that it started to begin with.

    Can you clarify when you're getting the error message in the title? Provided detailed steps would be useful. Also confirming whether this is for a single solution or even a new solution. Would also be useful to know what impact this is having on you (e.g. cannot debug solution, debugger fails while stepping, etc).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.