The error message “Process with an Id of #### is not running” in Visual Studio can be quite frustrating, but there are several steps you can take to resolve it. Here are some solutions you can try:
Delete the Hidden .vs Folder:
- Close Visual Studio.
- Navigate to the folder where your solution files are stored and delete the hidden
.vs
folder. - Restart Visual Studio.
- Hit F5, and IIS Express should load as normal, allowing you to debug.
- Note that this problem seems to be caused by moving a project between workstations, environments, or different versions of Visual Studio. The
.vs
folder may contain environment-specific information
Edit the Project File:
- Open Visual Studio as an administrator.
- Right-click your project and select “Unload Project.”
- Again, right-click your project and choose “Edit PROJECT_NAME.csproj.”
- Find the following code and delete it:XML
<DevelopmentServerPort>63366</DevelopmentServerPort> <DevelopmentServerVPath>/</DevelopmentServerVPath> <IISUrl>http://localhost:63366/</IISUrl>
- Save and close the
.csproj
file. - Right-click your project and reload it1.
Restart IIS Express:
- Stop the application.
- Make sure no other ASP.NET or Web API applications are running. If they are, stop them as well.
- Open the Run dialog by pressing Windows Key + R.
- Type
iisreset
in the textbox and press OK. - A command prompt window might open and perform some background processing. .
Additional Solutions:
- Delete the IIS folder with the following command:
rmdir /s /q "%userprofile%\Documents\IISExpress"
- Delete the
.vsConfig
folder in your Visual Studio instance. - Relaunch Visual Studio as an Administrator so that the necessary files can be rebuilt.
- Delete the IIS folder with the following command: