I develop an Angular app based on ASP.NET Core and there is some settings in launchSettings.json
in order to run the app with the given ports as shown below:
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
}
},
"EmployeeProject.WebUI": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://localhost:6000;https://localhost:6001",
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
However, I heard that these settings is ignored when using VS Code and when running the frontend and backend at the same time using dotnet watch run
the app starts by using random ports in every run. So, how can I make the app starts using the same ports (6000 or 6001) via dotnet run
or dotnet watch run
in VS Code?