diff --git a/eng/Versions.props b/eng/Versions.props index e950989d38ca..25ac4d4d81ad 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -281,7 +281,7 @@ 4.0.0 2.2.4 5.0.0 - 6.2.3 + 6.4.0 2.0.3 0.10.0 2.4.1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/localize/templatestrings.en.json index 4248d9a49bd8..34042fafad58 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/localize/templatestrings.en.json @@ -34,8 +34,9 @@ "symbols/CallsMicrosoftGraph/description": "Specifies if the web app calls Microsoft Graph. This option only applies if --auth SingleOrg or --auth MultiOrg is specified.", "symbols/CalledApiScopes/description": "Scopes to request to call the API from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C is specified.", "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", - "symbols/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json index d24c84fcfad3..b67b8d60e6fc 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json @@ -518,7 +518,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } }, diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.Main.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.Main.cs index 064a53e2b177..315cd5271f8c 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.Main.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.Main.cs @@ -153,11 +153,6 @@ public static void Main(string[] args) app.UseRouting(); - #if (OrganizationalAuth || IndividualAuth || WindowsAuth) - app.UseAuthentication(); - app.UseAuthorization(); - - #endif #if (OrganizationalAuth || IndividualAuth) app.MapControllers(); #endif diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.cs index 7c367d9ffdbd..0a67d3c65681 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.cs @@ -147,11 +147,6 @@ app.UseRouting(); -#if (OrganizationalAuth || IndividualAuth || WindowsAuth) -app.UseAuthentication(); -app.UseAuthorization(); - -#endif #if (OrganizationalAuth || IndividualAuth) app.MapControllers(); #endif diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/localize/templatestrings.en.json index 530197158ddc..24cc221cce89 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/localize/templatestrings.en.json @@ -36,11 +36,12 @@ "symbols/CalledApiUrl/description": "URL of the API to call from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C without and ASP.NET Core host is specified.", "symbols/CallsMicrosoftGraph/description": "Specifies if the web app calls Microsoft Graph. This option only applies if --auth SingleOrg or --auth MultiOrg is specified.", "symbols/CalledApiScopes/description": "Scopes to request to call the API from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C without and ASP.NET Core host is specified.", - "symbols/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'", "postActions/restoreClient/description": "Restore NuGet packages required by this project.", "postActions/restoreClient/manualInstructions/default/text": "Run 'dotnet restore'", "postActions/open-file/description": "Opens Readme.txt in the editor" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/template.json index 750bf24e806f..a311fe7dbb05 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/template.json @@ -631,7 +631,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } }, diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.Main.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.Main.cs index 7e448889c99f..113aa85521fb 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.Main.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.Main.cs @@ -107,13 +107,6 @@ public static void Main(string[] args) #if (IndividualLocalAuth) app.UseIdentityServer(); - #endif - #if (OrganizationalAuth || IndividualAuth) - app.UseAuthentication(); - #endif - #if (!NoAuth) - app.UseAuthorization(); - #endif app.MapRazorPages(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.cs index 300dee13708a..9fc50adeafc5 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Program.cs @@ -101,13 +101,6 @@ #if (IndividualLocalAuth) app.UseIdentityServer(); -#endif -#if (OrganizationalAuth || IndividualAuth) -app.UseAuthentication(); -#endif -#if (!NoAuth) -app.UseAuthorization(); - #endif app.MapRazorPages(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/localize/templatestrings.en.json index 764a457bb1df..c387db66e82a 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/localize/templatestrings.en.json @@ -11,8 +11,9 @@ "symbols/Framework/choices/net7.0/description": "Target net7.0", "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", "symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.", - "symbols/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json index 4fc7982b53f7..3b20b60fb282 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json @@ -180,7 +180,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } }, diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/localize/templatestrings.en.json index a1f2262d3d56..9adf380f3705 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/localize/templatestrings.en.json @@ -8,8 +8,9 @@ "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/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json index 9b1f90bc5ba9..0641a714227c 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json @@ -122,7 +122,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } }, diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/localize/templatestrings.en.json index 98d88c50b45c..cdf37104e46b 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/localize/templatestrings.en.json @@ -34,8 +34,9 @@ "symbols/CalledApiUrl/description": "URL of the API to call from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C is specified.", "symbols/CallsMicrosoftGraph/description": "Specifies if the web app calls Microsoft Graph. This option only applies if --auth SingleOrg or --auth MultiOrg is specified.", "symbols/CalledApiScopes/description": "Scopes to request to call the API from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C is specified.", - "symbols/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json index 4df867674105..ba365e1b8d42 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json @@ -434,7 +434,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } }, diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs index 78ae8273119d..dd61afa3354f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs @@ -140,11 +140,6 @@ public static void Main(string[] args) app.UseRouting(); - #if (OrganizationalAuth || IndividualAuth || WindowsAuth) - app.UseAuthentication(); - #endif - app.UseAuthorization(); - app.MapRazorPages(); #if (IndividualB2CAuth || OrganizationalAuth) app.MapControllers(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs index 71e967e07189..4c63ee0b11a0 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs @@ -134,11 +134,6 @@ app.UseRouting(); -#if (OrganizationalAuth || IndividualAuth || WindowsAuth) -app.UseAuthentication(); -#endif -app.UseAuthorization(); - app.MapRazorPages(); #if (IndividualB2CAuth || OrganizationalAuth) app.MapControllers(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/localize/templatestrings.en.json index d246072ffadf..2b0f9ba5f7fc 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/localize/templatestrings.en.json @@ -34,8 +34,9 @@ "symbols/CalledApiUrl/description": "URL of the API to call from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C is specified.", "symbols/CallsMicrosoftGraph/description": "Specifies if the web app calls Microsoft Graph. This option only applies if --auth SingleOrg or --auth MultiOrg is specified.", "symbols/CalledApiScopes/description": "Scopes to request to call the API from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C is specified.", - "symbols/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json index ba96fd2a6605..033195b6b877 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json @@ -430,7 +430,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } }, diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs index 0db833c8f23b..85c1b2a9479e 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs @@ -142,11 +142,6 @@ public static void Main(string[] args) app.UseRouting(); - #if (OrganizationalAuth || IndividualAuth || WindowsAuth) - app.UseAuthentication(); - #endif - app.UseAuthorization(); - app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs index bb5f9fa35aec..8d28741806b3 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs @@ -136,11 +136,6 @@ app.UseRouting(); -#if (OrganizationalAuth || IndividualAuth || WindowsAuth) -app.UseAuthentication(); -#endif -app.UseAuthorization(); - app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/localize/templatestrings.en.json index b613633e7353..85a25d4733c1 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/localize/templatestrings.en.json @@ -31,8 +31,9 @@ "symbols/CallsMicrosoftGraph/description": "Specifies if the web app calls Microsoft Graph. This option only applies if --auth SingleOrg is specified.", "symbols/CalledApiScopes/description": "Scopes to request to call the API from the web app. This option only applies if --auth SingleOrg or --auth IndividualB2C is specified.", "symbols/DisableOpenAPI/description": "Disable OpenAPI (Swagger) support", - "symbols/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json index 3d9f092550e8..ef6d47106283 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json @@ -398,7 +398,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } }, diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.Main.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.Main.cs index 19a203120f28..c8379dd1082d 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.Main.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.Main.cs @@ -92,11 +92,6 @@ public static void Main(string[] args) app.UseHttpsRedirection(); #endif - #if (OrganizationalAuth || IndividualAuth || WindowsAuth) - app.UseAuthentication(); - #endif - app.UseAuthorization(); - #if (UseMinimalAPIs) #if (OrganizationalAuth || IndividualB2CAuth) var scopeRequiredByApi = app.Configuration["AzureAd:Scopes"] ?? ""; diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.OrgOrIndividualB2CAuth.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.OrgOrIndividualB2CAuth.cs index 582824a16ba1..3152385a7b45 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.OrgOrIndividualB2CAuth.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.OrgOrIndividualB2CAuth.cs @@ -64,9 +64,6 @@ app.UseHttpsRedirection(); #endif -app.UseAuthentication(); -app.UseAuthorization(); - var scopeRequiredByApi = app.Configuration["AzureAd:Scopes"] ?? ""; var summaries = new[] { diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.WindowsOrNoAuth.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.WindowsOrNoAuth.cs index 0a2da1ce58f1..cb0244d74e09 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.WindowsOrNoAuth.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.MinimalAPIs.WindowsOrNoAuth.cs @@ -39,10 +39,6 @@ app.UseHttpsRedirection(); #endif -#if (WindowsAuth) -app.UseAuthentication(); -app.UseAuthorization(); -#endif var summaries = new[] { diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.cs index acb7f4ca0a66..ee2a6c101283 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Program.cs @@ -77,11 +77,6 @@ app.UseHttpsRedirection(); #endif -#if (OrganizationalAuth || IndividualAuth || WindowsAuth) -app.UseAuthentication(); -#endif -app.UseAuthorization(); - app.MapControllers(); app.Run(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/localize/templatestrings.en.json index 859e30647030..178995fcff8f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/localize/templatestrings.en.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/localize/templatestrings.en.json @@ -6,8 +6,9 @@ "symbols/Framework/description": "The target framework for the project.", "symbols/Framework/choices/net7.0/description": "Target net7.0", "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", - "symbols/UseProgramMain/displayName": "Do not use top-level statements", + "symbols/UseProgramMain/displayName": "Do not use _top-level statements", + "_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json index 5246a005392a..fd3dadb0a542 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json @@ -87,7 +87,7 @@ "type": "parameter", "datatype": "bool", "defaultValue": "false", - "displayName": "Do not use top-level statements", + "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." } },