Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change project templates to have separate "http" and "https" launch profiles #42027

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions AspNetCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -1718,6 +1718,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalJwtBearerSample", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-user-jwts.Tests", "src\Tools\dotnet-user-jwts\test\dotnet-user-jwts.Tests.csproj", "{89896261-C5DD-4901-BCA7-7A5F718BC008}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestInfrastructure", "TestInfrastructure", "{F0FBA346-D8BC-4FAE-A4B2-85B33FA23055}"
ProjectSection(SolutionItems) = preProject
src\ProjectTemplates\TestInfrastructure\Directory.Build.props.in = src\ProjectTemplates\TestInfrastructure\Directory.Build.props.in
src\ProjectTemplates\TestInfrastructure\Directory.Build.targets.in = src\ProjectTemplates\TestInfrastructure\Directory.Build.targets.in
src\ProjectTemplates\TestInfrastructure\PrepareForTest.targets = src\ProjectTemplates\TestInfrastructure\PrepareForTest.targets
src\ProjectTemplates\TestInfrastructure\runtimeconfig.norollforward.json = src\ProjectTemplates\TestInfrastructure\runtimeconfig.norollforward.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -11154,6 +11162,7 @@ Global
{AB4B9E75-719C-4589-B852-20FBFD727730} = {0B200A66-B809-4ED3-A790-CB1C2E80975E}
{7F079E92-32D5-4257-B95B-CFFB0D49C160} = {7FD32066-C831-4E29-978C-9A2215E85C67}
{89896261-C5DD-4901-BCA7-7A5F718BC008} = {AB4B9E75-719C-4589-B852-20FBFD727730}
{F0FBA346-D8BC-4FAE-A4B2-85B33FA23055} = {08D53E58-4AAE-40C4-8497-63EC8664F304}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3E8720B3-DBDD-498C-B383-2CC32A054E8F}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>DotNetEfFullPath</_Parameter1>
<_Parameter2>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))dotnet-ef/$(DotnetEfVersion)/tools/netcoreapp3.1/any/dotnet-ef.dll</_Parameter2>
<_Parameter2>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))dotnet-ef/$(DotnetEfVersion)/tools/net6.0/any/dotnet-ef.dll</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>TestPackageRestorePath</_Parameter1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"symbols/UserSecretsId/description": "The ID to use for secrets (use with OrgReadAccess or Individual auth).",
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.",
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.",
"symbols/kestrelHttpsPort/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).",
"symbols/kestrelHttpsPort/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 IndividualB2C or OrganizationalAuth is used).",
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.",
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express 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).",
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.",
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express 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 IndividualB2C or OrganizationalAuth is used).",
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.",
"symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified.",
"symbols/Framework/description": "The target framework for the project.",
"symbols/Framework/choices/net7.0/description": "Target net7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
"kestrelHttpsPort": {
"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)."
"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 IndividualB2C or OrganizationalAuth is used)."
},
"kestrelHttpsPortGenerated": {
"type": "generated",
Expand Down Expand Up @@ -381,7 +381,7 @@
"iisHttpsPort": {
"type": "parameter",
"datatype": "integer",
"description": "Port number to use for the IIS Express 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)."
"description": "Port number to use for the IIS Express 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 IndividualB2C or OrganizationalAuth is used)."
},
"iisHttpsPortGenerated": {
"type": "generated",
Expand Down Expand Up @@ -434,13 +434,13 @@
},
"RequiresHttps": {
"type": "computed",
"value": "(OrganizationalAuth || IndividualAuth || !NoHttps)"
"value": "(OrganizationalAuth || IndividualB2C || !NoHttps)"
},
"NoHttps": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
"description": "Whether to turn off HTTPS. This option only applies if IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
},
"UseLocalDB": {
"type": "parameter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,28 @@
}
},
"profiles": {
"BlazorServerWeb-CSharp": {
//#if(!RequiresHttps)
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
//#if(RequiresHttps)
"applicationUrl": "https://localhost:5001;http://localhost:5000",
//#else
"applicationUrl": "http://localhost:5000",
//#endif
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
//#if(!NoHttps)
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,26 @@
}
},
"profiles": {
"Company.WebApplication1": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
//#if(NoHttps)
"applicationUrl": "http://localhost:5000",
//#else
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#if(!NoHttps)
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
//#endif
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,26 @@
}
},
"profiles": {
"Company.WebApplication1": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
//#if(NoHttps)
"applicationUrl": "http://localhost:5000",
//#else
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#if(!NoHttps)
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
//#endif
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{
"profiles": {
"GrpcService-CSharp": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://localhost:5000;https://localhost:5001",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json in the generated template.",
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.",
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.",
"symbols/kestrelHttpsPort/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).",
"symbols/kestrelHttpsPort/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 IndividualB2C or OrganizationalAuth is used).",
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.",
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express 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).",
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.",
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express 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 IndividualB2C or OrganizationalAuth is used).",
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.",
"symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified.",
"symbols/Framework/description": "The target framework for the project.",
"symbols/Framework/choices/net7.0/description": "Target net7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
"kestrelHttpsPort": {
"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)."
"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 IndividualB2C or OrganizationalAuth is used)."
},
"kestrelHttpsPortGenerated": {
"type": "generated",
Expand Down Expand Up @@ -303,7 +303,7 @@
"iisHttpsPort": {
"type": "parameter",
"datatype": "integer",
"description": "Port number to use for the IIS Express 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)."
"description": "Port number to use for the IIS Express 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 IndividualB2C or OrganizationalAuth is used)."
},
"iisHttpsPortGenerated": {
"type": "generated",
Expand Down Expand Up @@ -356,13 +356,13 @@
},
"RequiresHttps": {
"type": "computed",
"value": "(OrganizationalAuth || IndividualAuth || !NoHttps)"
"value": "(OrganizationalAuth || IndividualB2C || !NoHttps)"
},
"NoHttps": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
"description": "Whether to turn off HTTPS. This option only applies if IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
},
"UseLocalDB": {
"type": "parameter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,28 @@
}
},
"profiles": {
"Company.WebApplication1": {
//#if(!RequiresHttps)
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
//#if(RequiresHttps)
"applicationUrl": "https://localhost:5001;http://localhost:5000",
//#else
"applicationUrl": "http://localhost:5000",
//#endif
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
//#if(!NoHttps)
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"symbols/UserSecretsId/description": "The ID to use for secrets (use with OrgReadAccess or Individual auth).",
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.",
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.",
"symbols/kestrelHttpsPort/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).",
"symbols/kestrelHttpsPort/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 IndividualB2C or OrganizationalAuth is used).",
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.",
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express 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).",
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.",
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express 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 IndividualB2C or OrganizationalAuth is used).",
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.",
"symbols/UseLocalDB/description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified.",
"symbols/Framework/description": "The target framework for the project.",
"symbols/Framework/choices/net7.0/description": "Target net7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
"kestrelHttpsPort": {
"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)."
"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 IndividualB2C or OrganizationalAuth is used)."
},
"kestrelHttpsPortGenerated": {
"type": "generated",
Expand Down Expand Up @@ -293,7 +293,7 @@
"iisHttpsPort": {
"type": "parameter",
"datatype": "integer",
"description": "Port number to use for the IIS Express 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)."
"description": "Port number to use for the IIS Express 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 IndividualB2C or OrganizationalAuth is used)."
},
"iisHttpsPortGenerated": {
"type": "generated",
Expand Down Expand Up @@ -346,13 +346,13 @@
},
"RequiresHttps": {
"type": "computed",
"value": "(OrganizationalAuth || IndividualAuth || !NoHttps)"
"value": "(OrganizationalAuth || IndividualB2C || !NoHttps)"
},
"NoHttps": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
"description": "Whether to turn off HTTPS. This option only applies if IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
},
"UseLocalDB": {
"type": "parameter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,28 @@
}
},
"profiles": {
"Company.WebApplication1": {
//#if(!RequiresHttps)
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
//#if(RequiresHttps)
"applicationUrl": "https://localhost:5001;http://localhost:5000",
//#else
"applicationUrl": "http://localhost:5000",
//#endif
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
//#if(!NoHttps)
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
//#endif
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
Expand Down
Loading