In standalone template, generate a launchSettings.json that doesn't have

IISExpress. Fixes #235
This commit is contained in:
Steve Sanderson 2018-03-15 16:29:33 +00:00
parent 1d31a80b50
commit eb727c0464
4 changed files with 37 additions and 1 deletions

View File

@ -19,7 +19,7 @@
<files>
<file
src="content/**/*"
exclude="**/launchSettings.json;**/node_modules/**;**/bin/**;**/obj/**;**/*.user;**/.vs/**;**/.vscode/**;content/Directory.Build.*"
exclude="content/BlazorHosted.CSharp.Client/Properties/launchSettings.json;content/BlazorHosted.CSharp.Server/Properties/launchSettings.json;**/node_modules/**;**/bin/**;**/obj/**;**/*.user;**/.vs/**;**/.vscode/**;content/Directory.Build.*"
target="Content" />
</files>
</package>

View File

@ -43,6 +43,24 @@
"type": "bind",
"binding": "HostIdentifier"
},
"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": "61501"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",

View File

@ -15,5 +15,11 @@
"learnMoreLink": "https://github.com/aspnet/blazor",
"uiFilters": [
"oneaspnet"
],
"ports": [
{
"name": "HttpPort",
"useHttps": false
}
]
}

View File

@ -0,0 +1,12 @@
{
"profiles": {
"BlazorStandalone.CSharp": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:61501/"
}
}
}