C#C
C#3y ago
Spaxter

✅ launchSettings.json being ignored completely

All of a sudden, my .NET Visual Studio project has stopped respecting my launchSettings.json file. No matter what profile I run the app with, it uses the ports 5000 and 5001. I have no idea how this happened or why.

launchSettings.json
{
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "swagger",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "Docker": {
      "commandName": "Docker",
      "launchBrowser": true,
      "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
      "publishAllPorts": true,
      "useSSL": true
    },
    "WSL": {
      "commandName": "WSL2",
      "launchBrowser": true,
      "launchUrl": "https://localhost:7272/swagger",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development",
        "ASPNETCORE_URLS": "https://localhost:7272;http://localhost:5109"
      },
      "distributionName": ""
    }
  },
  "$schema": "https://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:48027",
      "sslPort": 44314
    }
  }
}
Was this page helpful?