Auto-generate random port and proper project settings for the server project (#18842)

This commit is contained in:
Artak 2020-02-09 12:21:47 -08:00 committed by GitHub
parent f5f51f5fd5
commit d39ed09c29
2 changed files with 41 additions and 1 deletions

View File

@ -107,6 +107,46 @@
"datatype": "bool",
"defaultValue": "false",
"description": "If specified, includes an ASP.NET Core host for the Blazor app."
},
"HttpPort": {
"type": "parameter",
"datatype": "integer",
"description": "Port number to use for the HTTP endpoint in launchSettings.json."
},
"HttpPortGenerated": {
"type": "generated",
"generator": "port"
},
"HttpPortReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "HttpPort",
"fallbackVariableName": "HttpPortGenerated"
},
"replaces": "8080"
},
"HttpsPort": {
"type": "parameter",
"datatype": "integer",
"description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
},
"HttpsPortGenerated": {
"type": "generated",
"generator": "port",
"parameters": {
"low": 44300,
"high": 44399
}
},
"HttpsPortReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "HttpsPort",
"fallbackVariableName": "HttpsPortGenerated"
},
"replaces": "44300"
}
},
"tags": {

View File

@ -20,7 +20,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Company.WebApplication1": {
"BlazorWasm-CSharp.Server": {
"commandName": "Project",
"launchBrowser": true,
//#if(RequiresHttps)