如何更改 Visual Studio 2017 中用于调试的默认浏览器?

How to change the default browser for debugging in Visual Studio 2017?

我正在开发一个 ASP.NET Core Web API 项目,该项目使用 Topshelf 作为服务托管。当我从调试器启动服务时,Swagger 页面出现在 Internet Explorer 中。我该如何更改才能使用 Chrome 启动它?

从开始调试按钮,单击小箭头,然后执行以下操作:

在这种情况下,默认浏览器是从控制面板中选择的。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="WebSiteBinding" value="http://localhost:63037"/>
<add key="Environment" value="LOCAL"/>
<add key="ServiceName" value="Debug"/>
<add key="ServiceDisplayName" value="Debug"/>
</appSettings>
</configuration>

class ApiService
{
    private string _url;
    private IWebHost _host;

    public void Start(string[] args)
    {
        _url = ConfigurationManager.AppSettings["WebSiteBinding"];

        _host = BuildWebHost(args);
        _host.Start();

#if DEBUG
        System.Diagnostics.Process.Start(_url);
#endif
    }

    public void Stop()
    {
        _host.Dispose();
    }

    public IWebHost BuildWebHost(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
            .UseStartup<Startup>()
            .UseNLog()
            .UseHttpSys(options =>
            {
                options.Authentication.Schemes = AuthenticationSchemes.NTLM;
                options.Authentication.AllowAnonymous = true;
                options.UrlPrefixes.Add(_url);
            })
            .Build();
}