How to run Azure Function app on a different port in Visual Studio

or 

azure function error unknown argument --port


How to Fix it?

  • Update Project Properties -> Debug to following
  • put the following command  "host start --port 7071 --pause-on-error"


host start --port 7071 --pause-on-error




Finally, it works