//------------多环境 获取数组下面的值 "DBS": [ { "ConnId": "MYSQL1", "Connection": "server=112.11.33.55\\ms2012;uid=sa;pwd=123;database=databaseqq;" } , { "ConnId": "MYSQL2", "Connection": "server=.;Database=ddd;Uid=root;Pwd=1234526;Port=10060;Allow User Variables=True;" } ] _configuration.GetSection("DBS:0:Connection").Value ----- 获取数组下面的值 launchSettings.json { "profiles": { //节点下 MyLocal ,new5 "CloudCubic": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, "applicationUrl": "http://localhost:8081" }, "MyLocal": { "ylfid": "mylocal", "commandName": "Project", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "MyLocal" }, "applicationUrl": "http://localhost:8082" }, "new5": { "ylfid": "new5", "commandName": "Project", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "new5" }, "applicationUrl": "http://localhost:8083" }, dotnet qq.Api.dll --urls="http://*:8081" dotnet qq.Api.dll --urls="http://*:8082" dotnet qq.Api.dll --urls="http://*:8083"
标签:http,记录,ASPNETCORE,环境,environmentVariables,dll,简单,launchBrowser,new5 From: https://www.cnblogs.com/Fengge518/p/17452757.html