- 方式1:VS直接调试启动
launchSettings.json配置文件修改
"项目名称": {
"commandName": "Project",
"launchBrowser": true,
"commandLineArgs": "--urls=\"http://*:5000\" ",
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"nativeDebugging": true,
"applicationUrl": "http://localhost:5000"
}
- 方式2:命令启动
dotnet run --urls=http://*:5000