TekOnline

Quick fix commands for killing a left over .net core process that is hogging the port.

1. Find what’s on the port

netstat -ano | findstr 7064

2. Kill it by PID (replace ##### with the PID from step 1)

taskkill /PID ##### /F

Or do it all in one line (find + kill):

$pid = (netstat -ano | Select-String "7064" | Select-Object -First 1 | ForEach-Object { ($_ -split '\s+')[-1] }); if ($pid) { Stop-Process -Id $pid -Force; Write-Host "Killed PID $pid" } else { Write-Host "Port 7064 is free" }
You should now be able to start debugging again without the "address already in use" error. If you're using Visual Studio, sometimes stopping the debug session with the red square (instead of detaching or closing the browser) doesn't fully terminate the process — always use Debug → Stop Debugging to cleanly kill it.

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *