Search code examples
asp.net-coresettingsrider

How to prevent Rider from auto opening ASP.NET Core WebApp in browser after every run?


I am creating WebApp in Rider and I always have one (or more) window in browser opened with my App. And then when I make some change and rerun Application, Rider opens another tab in browser.

I hope it can be disabled. I looked for answer but couldn't find anything.

Every solution I found was about Visual Studio, but I couldn't find similar one in Rider.


Solution

  • You can turn it off in Properties\launchSettings.json, e.g.:

    {
      "iisSettings": {
        "windowsAuthentication": false,
        "anonymousAuthentication": true,
        "iisExpress": {
          "applicationUrl": "http://localhost:46186",
          "sslPort": 44347
        }
      },
      "profiles": {
        "ASP.NETCoreWebApplication1": {
          "commandName": "Project",
          "launchBrowser": false, <---- THIS
          "applicationUrl": "https://localhost:7104;http://localhost:5171",
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development",
            "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
          }
        },
        "IIS Express": {
          "commandName": "IISExpress",
          "launchBrowser": false, <--- THIS
          "environmentVariables": {
            "ASPNETCORE_ENVIRONMENT": "Development",
            "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
          }
        }
      }
    }
    

    You can then confirm this change in Run->Edit Configuration...: enter image description here