gpt4 book ai didi

asp.net - 从命令行运行应用程序并启动浏览器

转载 作者:行者123 更新时间:2023-12-01 05:59:48 24 4
gpt4 key购买 nike

我想从命令行启动我的应用程序并自动启动浏览器并显示默认页面(因为它是从 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com