Failed to bind to address with Visual Studio Mac - solved!

If you’ve had this issue before then you know it can be a pain to change your port or even restart your Mac each time it happens.

Thankfully there’s an easier way...

Find and kill the process responsible

  1. Open the terminal on your Mac
  2. Find what processes are running on the affected port: lsof -i: <port number>
  3. Kill the process that’s responsible: kill -9 <process number>

Here's a link to the Stack Overflow post and thanks to user BitcoinKing for the solution:

Failed to bind to address (already in use) error with Visual Studio Mac API
I’m attempting to create a Web API via .Net Core. I’m just using the boilerplate ValuesController as a Hello World. When I run the project, I get the following error: System.IO.IOException: “Faile...

Like this post? Got a question?

Reply via: Email, Bluesky, Mastodon, Twitter