1

when I open a project in VS and Press F5 I get the error of "Process with an id of "xxxx" is not running" but if I keep Visual studio open and wait for about 30 minutes and then press F5 it works fine!

Does anyone knows why?

Hadi Attar
  • 73
  • 1
  • 1
  • 5
  • You need to get your machine healthy again. That invariably starts by temporarily disabling the installed anti-malware product to check if it is the cause. – Hans Passant Apr 27 '19 at 12:31
  • Thank you Hans Passant, I disabled windows defender Real-Time Protection and the problem solved. Can you tell me why that's happened and how can I fix it? I have no Antivirus on my system. – Hadi Attar Apr 27 '19 at 15:36
  • 1
    Anti-malware often gets upset by executable files appearing from seemingly nowhere. That Defender does this is pretty unusual, maybe your code also does something that it considers suspicious. – Hans Passant Apr 27 '19 at 16:14
  • @HadiAttar Hi, does this issue go way after you disable the windows defender Real-Time Projection? It it's enabled, the issue comes again? Try suggestions from [this link](https://stackoverflow.com/questions/26375217/process-with-an-id-of-xxxx-is-not-running-in-visual-studioincluded-2013-to-20). – LoLance Apr 29 '19 at 03:05

8 Answers8

13

1.Run Visual Studio as an administrator

2.Open your project file(In Solution Explorer, right-click project=>unload project=>edit x.xxproj)

Delete script below:

<DevelopmentServerPort>63366</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:63366/</IISUrl>

Save the changes and reload the project. F5 to check if it helps.

Please check this similar issue.

LoLance
  • 25,666
  • 1
  • 39
  • 73
5

Do the following steps :-

  1. Close all the instances of VS in your PC.
  2. Open folder which contains solution file for current project and delete the hidden .vs folder.
  3. Again open the Visual Studio.
  4. Press F5 and IIS Express should load as normal, allowing you to debug.

It works for me. Thanks!

Sunny_Sid
  • 401
  • 4
  • 13
1

I resolved the issue by turning OneDrive back on, seriously. I must have free up some space on my PC and left OneDrive off. When VS ran it needed some files to be available to start up IIS.

I also cleaned .vs and bin/obj and we are back running

Kevin
  • 80
  • 5
  • Using Visual Studio 2022 on a new computer I ran into this same issue. I disabled OneDrive, but did not realize Microsoft had automatically synced my Documents folder. Either re-enabling OneDrive or disabling sync on the Documents folder before disabling OneDrive fixes the problem for me. – djroedger Aug 09 '23 at 18:53
0

we need a lot more information.

Are you trying to build a program with an IIS Instance? Did you delete any DLLs? Does it work on other machines?

Things to try:

Try a full clean and rebuild. That is, clean the solution, git new, rebuild all. Fix any errors and warnings, then launch with F5.

Run Visual Studio as an admin. Start > Visual Studio > right click > Run as Administrator.

In your csproj file, delete the following lines:

<DevelopmentServerPort>62140</DevelopmentServerPort>
<DevelopmentServerVPath></DevelopmentServerVPath>
<IISUrl>http://localhost:62116/</IISUrl>

Save, then reload.

Try following the solutions from this Stack Overflow:

Process with an ID #### is not running in visual studio professional 2013 update 3

Delete the IIS folder with:

rmdir /s /q "%userprofile%\Documents\IISExpress

Delete the .vs\Config folder in your Visual Studio instance.

Relaunch Visual Studio as Administrator, so they can be rebuilt.

You should now be up and running.

GokuMizuno
  • 493
  • 2
  • 5
  • 14
  • 1. No, build on IISExpress 2. No didn't delete any DLLs 3. yes it worked on other machine. I tried all the solutions you provided also the solutions in the link but none of them are working... what makes me confused is that why after about 30 minutes the problem get fixed may be I have to make some changes in IIS Idle Timeout – Hadi Attar Apr 27 '19 at 14:21
0

I tried all the solutions from here and from the Internet. Eventually I uninstalled IIS Express and reinstalled it, and it worked. (tried on VS 2015)

0

I've done th esame as Sunny_sid but I just renamed .vs with old_vs, just in case. Restart VS right after and project runs !

0

I was getting the same error today in my Visual Studio 2019. The easy fix is to kill the process that is running in the port you are trying to use.

enter image description here

To fix this, here are the steps I have done.

  • Verify that the port your application is running, right-click on the project, open the property pane.

enter image description here

  • Open the PowerShell and type the preceding command

    Get-Process -Id (Get-NetTCPConnection -LocalPort 1068).OwningProcess

Please remember to change the port number. From the result, you can see that you have an ongoing process with Id 21276. You can also get this information from your IISEXPRESS too, from the pop-up message you get when the error occurs.

  • Go to Task Manager and then click on the Details` tab, find the process
  • Right-click on the process and then click End Task
  • You can also try doing this in PowerShell by running taskkill /F /PID pid_number or taskkill /IM "process name" /F
Sibeesh Venu
  • 18,755
  • 12
  • 103
  • 140
0

In my case, the error was caused by the fact that the project was targeting .NET5 but my other workstation only has .NET6. I changed the version number in the csproj file. I assume that installing .NET5 in this environment would have worked as well.

Would think the error message when I attempt to run the project would have been clearer. It was simple in the end.

Michael Dera
  • 99
  • 14