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

Update templates to incorporate net7 changes #42802

Merged
merged 5 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
<SerilogSinksFileVersion>4.0.0</SerilogSinksFileVersion>
<StackExchangeRedisVersion>2.2.4</StackExchangeRedisVersion>
<SystemReactiveLinqVersion>5.0.0</SystemReactiveLinqVersion>
<SwashbuckleAspNetCoreVersion>6.2.3</SwashbuckleAspNetCoreVersion>
<SwashbuckleAspNetCoreVersion>6.4.0</SwashbuckleAspNetCoreVersion>
<XunitAbstractionsVersion>2.0.3</XunitAbstractionsVersion>
<XunitAnalyzersVersion>0.10.0</XunitAnalyzersVersion>
<XunitVersion>2.4.1</XunitVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"displayName": "Do not use top-level statements",
"displayName": "Do not use _top-level statements",
captainsafia marked this conversation as resolved.
Show resolved Hide resolved
"description": "Whether to generate an explicit Program class and Main method instead of top-level statements."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@

app.UseRouting();

#if (OrganizationalAuth || IndividualAuth || WindowsAuth)
app.UseAuthentication();
app.UseAuthorization();

#endif
#if (OrganizationalAuth || IndividualAuth)
app.MapControllers();
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
captainsafia marked this conversation as resolved.
Show resolved Hide resolved
"_symbols/UseProgramMain/displayName.comment": "Use '_' as accelerator key when translating.",
captainsafia marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@

#if (IndividualLocalAuth)
app.UseIdentityServer();
#endif
#if (OrganizationalAuth || IndividualAuth)
app.UseAuthentication();
#endif
#if (!NoAuth)
app.UseAuthorization();

#endif

app.MapRazorPages();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,6 @@ public static void Main(string[] args)

app.UseRouting();

captainsafia marked this conversation as resolved.
Show resolved Hide resolved
#if (OrganizationalAuth || IndividualAuth || WindowsAuth)
app.UseAuthentication();
#endif
app.UseAuthorization();

app.MapRazorPages();
#if (IndividualB2CAuth || OrganizationalAuth)
app.MapControllers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@

app.UseRouting();

#if (OrganizationalAuth || IndividualAuth || WindowsAuth)
app.UseAuthentication();
#endif
app.UseAuthorization();

app.MapRazorPages();
#if (IndividualB2CAuth || OrganizationalAuth)
app.MapControllers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] ?? "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
app.UseHttpsRedirection();
#endif

app.UseAuthentication();
app.UseAuthorization();

var scopeRequiredByApi = app.Configuration["AzureAd:Scopes"] ?? "";
var summaries = new[]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@

app.UseHttpsRedirection();
#endif
#if (WindowsAuth)
app.UseAuthentication();
app.UseAuthorization();
#endif

var summaries = new[]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@
app.UseHttpsRedirection();
#endif

#if (OrganizationalAuth || IndividualAuth || WindowsAuth)
app.UseAuthentication();
#endif
app.UseAuthorization();

app.MapControllers();

app.Run();
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down