dotnet watch --project app\App.csproj run
, it listens on different port - 5001!Here is my launchSettings.json
"App": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"applicationUrl": "https://localhost:5003;http://localhost:5002",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"LocalUrl": "https://localhost:5003"
}
}
Why the dotnet run starts on different port and how to make it to run on 5003?
Addional info:
The app was created in .NET 5 and the problem occured after upgraded the SDK and PackageReferences .NET 6,
It's a known bug in .NET 6, see: