我想从命令行启动我的应用程序并自动启动浏览器并显示默认页面(因为它是从 IDE 运行的)。我试过这个命令:
dotnet run --launch-profile "MyApp"
在我的应用程序 launchSettings.json 中,我定义了:
"MyApp": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:53348/"
}
但是浏览器没有启动。
最佳答案
基本上,在这种情况下,可以一个接一个地运行批处理文件中的两个程序,这将解决一个问题。
关于asp.net - 从命令行运行应用程序并启动浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46795469/