(如果重要的话,可以在 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 文件。