I added the following section in project.json.
project.json
\"commands\": { \"run\": \"run server.urls=http://localhost:8082\", \"web\": \"Microsof
In visual studio 2017 we can change the port number from LaunchSetting.json
In Properties-> LaunchSettings.json.
Open LaunchSettings.json and change the Port Number.
Change the port Number in json file