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.

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,331 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

  2. Tianyu Sun-MSFT 34,451 Reputation points Microsoft External Staff
    2025-01-21T10:03:55.7133333+00:00

    Hi @Dhruvin lad ,

    I doubt that some required configurations are not set correctly or missing.

    Please make sure that the .NET SDK your project targets is indeed installed on your machine. If it’s missing, try to download and install it manually from here: Download .NET.

    Also, please click Tools => Options => Projects and Solutions => Web Projects, check the "Use the 64 bit version of IIS Express for web sites and projects" option then run the project. See if this option makes it work.

    Besides, have you tried to create and test a newly created project, without editing it or adding anything, just build and run it. Does it run correctly?

    If you can share us more details about your project and the settings you configured, it will be very helpful.

    Feel free to contact us.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.