小编Int*_*020的帖子

运行应用程序时,在 VSCode 中启动 ASP.NET Core 应用程序中的特定 URL

(如果重要的话,可以在 Mac 上运行。)

在 Visual Studio 中,您可以在运行或调试 ASP.NET Core 项目时使用此方法启动特定 URL。使用 launchUrl 属性。这是一个示例 launchSettings.json 文件:

{
  "profiles": {
    "MyProjectName": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "customstartupurlgoeshere/?id=theanswertotheuniverse",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "https://localhost:5001;http://localhost:5000"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

VS Code 中的模拟是什么?我读到 VS Code 会忽略 launchSettings.json 文件。

c# visual-studio-code asp.net-core

9
推荐指数
3
解决办法
1万
查看次数

标签 统计

asp.net-core ×1

c# ×1

visual-studio-code ×1