首页 > 解决方案 > 调用 asp.net 核心项目的启动配置文件时,launchBrowser 不起作用

问题描述

当我运行“dotnet watch run --launch-profile Watch”时,项目启动,但没有启动浏览器。

launchSettings.json,配置文件Watch

"Watch": {
  "commandName": "Project",
  "executablePath": "C:\\Program Files\\dotnet\\dotnet.exe",
  "workingDirectory": "$(ProjectDir)",
  "launchBrowser": true,
  "launchUrl": "https://localhost:5001/",
  "applicationUrl": "https://localhost:5001/",
  "environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }
}

标签: .netvisual-studioasp.net-coreconfigurationdotnet-cli

解决方案


推荐阅读