Dotnet run no longer shows port info, but backoffice works on port 5001

Previously, running dotnet run in my Umbraco project displayed the active port (e.g., “Now listening on: https://localhost:5001”).
Now it only shows warnings (like “: warning NU1902: Package ‘Umbraco.Cms’ 13.5.0 has a known moderate severity vulnerability, Umbraco Makes User Enumeration Feasible Based on Timing of Login Response · CVE-2025-46736 · GitHub Advisory Database · GitHub”).

The backoffice remains accessible at the port I configured in Program.cs (5001), but the lack of console output is confusing.

Environment:

  • Umbraco 13
  • .NET 7/8
  • Running via dotnet run (no Docker)

Has anyone encountered this?

I had this issue at some point. I had to manually add writeTo → console to my serilog entry in appsettings.

 "Serilog": {
    "WriteTo": [
      {
        "Name": "Console"
      }
    ],
    "MinimumLevel": {
      "Default": "Information"
    }
  }

I tried that but without success!

When the environment is not set to development then this information is not displayed in the console.

Have you perhaps set an environment variable for the dotnet environment in your terminal recently that may have changed it?

I would check your launchsettings.json found at Properties/launchSettings.json

{
  "$schema": "https://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:17082",
      "sslPort": 44391
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "Umbraco.Web.UI": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "applicationUrl": "https://localhost:44391;http://localhost:17082",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }      
    }
  }
}

The important thing is that the ASPNETCORE_ENVIRONMENT is set to Development

Another way to verify if this is the problem is to pass the environment switch on the CLI itself.
dotnet run --environment=Development and then if you try with dotnet run --environment=Production you can see there are no logs typically output to the console unless you configured it to do so explicitly.

I run it using dotnet run --environment=Development but without success!

Here is the json:

{
  "$schema": "https://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:11934",
      "sslPort": 44325
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "Umbraco.Web.UI": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "applicationUrl": "https://localhost:44325;http://localhost:11934",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }      
    }
  }
}