Search code examples
release.net-6.0visual-studio-2022kestrel

Kestrel launchSettings.json on Release in NET.6 VS2022


gRPS .NET 6 service on Release doesn't pick up applicationUrl from launchSettings.json and listens by default - localhost:5000 and 5001 for https. How and where to set up a release so that it picks up the launchSettings.json in VS2022?


Solution

  • launchSettings.json is used only for development environment. From the docs:

    The launchSettings.json file:

    • Is only used on the local development machine.
    • Is not deployed.
    • Contains profile settings.

    For non-development environment options check the Use multiple environments in ASP.NET Core article.

    Also can be useful: