diff --git a/eng/Versions.props b/eng/Versions.props
index d80476d426a2..dbae07ff4da4 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -235,9 +235,9 @@
5.2.0
5.2.0
2.1.90
- 1.14.1
- 1.1.0
- 1.1.0
+ 1.16.0
+ 1.16.0
+ 1.16.0
$(MessagePackVersion)
4.10.0
0.11.2
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 167ea7f5e9c9..cd44728a4894 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
@@ -220,6 +220,61 @@
"Server/Models/ApplicationUser.cs",
"Server/Readme.txt"
]
+ },
+ {
+ "condition": "(!GenerateApi)",
+ "exclude": [
+ "Client/Pages/CallWebApi.razor",
+ "Server/Controllers/CallWebApiController.cs"
+ ]
+ },
+ {
+ "condition": "(!GenerateGraph)",
+ "exclude": [
+ "Client/Shared/NavMenu.CallsMicrosoftGraph.razor",
+ "Client/Pages/ShowProfile.razor",
+ "Server/Controllers/ShowProfileController.cs"
+ ]
+ },
+ {
+ "condition": "(!GenerateApiOrGraph && Hosted)",
+ "rename": {
+ "Client/Shared/NavMenu.NoGraphOrApi.razor": "Client/Shared/NavMenu.razor"
+ },
+ "exclude": [
+ "Client/Shared/NavMenu.CallsMicrosoftGraph.razor",
+ "Client/Shared/NavMenu.CallsWebApi.razor"
+ ]
+ },
+ {
+ "condition": "(!GenerateApiOrGraph && !Hosted)",
+ "rename": {
+ "Client/Shared/NavMenu.NoGraphOrApi.razor": "Shared/NavMenu.razor"
+ },
+ "exclude": [
+ "Client/Shared/NavMenu.CallsMicrosoftGraph.razor",
+ "Client/Shared/NavMenu.CallsWebApi.razor"
+ ]
+ },
+ {
+ "condition": "(GenerateGraph)",
+ "rename": {
+ "Client/Shared/NavMenu.CallsMicrosoftGraph.razor": "Client/Shared/NavMenu.razor"
+ },
+ "exclude": [
+ "Client/Shared/NavMenu.NoGraphOrApi.razor",
+ "Client/Shared/NavMenu.CallsWebApi.razor"
+ ]
+ },
+ {
+ "condition": "(GenerateApi)",
+ "rename": {
+ "Client/Shared/NavMenu.CallsWebApi.razor": "Client/Shared/NavMenu.razor"
+ },
+ "exclude": [
+ "Client/Shared/NavMenu.NoGraphOrApi.razor",
+ "Client/Shared/NavMenu.CallsMicrosoftGraph.razor"
+ ]
}
]
}
@@ -527,11 +582,11 @@
},
"GenerateApi": {
"type": "computed",
- "value": "(( (IndividualB2CAuth && !Hosted) || OrganizationalAuth) && (CalledApiUrl != \"https://graph.microsoft.com/v1.0\" || CalledApiScopes != \"user.read\"))"
+ "value": "(( (IndividualB2CAuth && !Hosted) || (OrganizationalAuth && Hosted)) && (CalledApiUrl != \"https://graph.microsoft.com/v1.0\" || CalledApiScopes != \"user.read\"))"
},
"GenerateGraph": {
"type": "computed",
- "value": "(OrganizationalAuth && CallsMicrosoftGraph)"
+ "value": "(OrganizationalAuth && CallsMicrosoftGraph && Hosted)"
},
"GenerateApiOrGraph": {
"type": "computed",
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.CallsMicrosoftGraph.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.CallsMicrosoftGraph.razor
new file mode 100644
index 000000000000..bf3861b2437b
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.CallsMicrosoftGraph.razor
@@ -0,0 +1,44 @@
+
+
+
+
+@code {
+ private bool collapseNavMenu = true;
+
+ private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
+
+ private void ToggleNavMenu()
+ {
+ collapseNavMenu = !collapseNavMenu;
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.CallsWebApi.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.CallsWebApi.razor
new file mode 100644
index 000000000000..b15bedf50838
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.CallsWebApi.razor
@@ -0,0 +1,44 @@
+
+
+
+
+@code {
+ private bool collapseNavMenu = true;
+
+ private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
+
+ private void ToggleNavMenu()
+ {
+ collapseNavMenu = !collapseNavMenu;
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.NoGraphOrApi.razor
similarity index 100%
rename from src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.razor
rename to src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/NavMenu.NoGraphOrApi.razor
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/appsettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/appsettings.json
index e3566d020610..2117429dd5d2 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/appsettings.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/appsettings.json
@@ -8,16 +8,21 @@
////#endif
// },
////#elseif (IndividualB2CAuth)
+///*
+The following identity settings need to be configured
+before the project can be successfully executed.
+For more info see https:////aka.ms/dotnet-template-ms-identity-platform
+//*/
// "AzureAdB2C": {
// "Instance": "https:////aadB2CInstance.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
-// "Scopes": "api-scope",
// "ClientCertificates" : [
// ],
//#endif
+// "Scopes": "api-scope",
// "SignUpSignInPolicyId": "MySignUpSignInPolicyId"
// },
////#elseif (OrganizationalAuth)
@@ -40,11 +45,12 @@ For more info see https:////aka.ms/dotnet-template-ms-identity-platform
// "ClientCertificates" : [
// ],
//#endif
+// "Scopes": "api-scope",
// "CallbackPath": "/signin-oidc"
// },
////#endif
////#if (GenerateApiOrGraph)
-// "DownstreamAPI": {
+// "DownstreamApi": {
// /*
// 'Scopes' contains space separated scopes of the Web API you want to call. This can be:
// - a scope for a V2 application (for instance api://b3682cc7-8b30-4bd2-aaba-080c6bf0fd31/access_as_user)
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 a4970ed06183..1e871b3b8a22 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
@@ -101,14 +101,14 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
- "defaultValue": "https://login.microsoftonline.com/tfp/",
- "replaces": "https:////login.microsoftonline.com/tfp/",
+ "defaultValue": "https://qualified.domain.name.b2clogin.com/",
+ "replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
"type": "parameter",
"datatype": "string",
- "defaultValue": "",
+ "defaultValue": "b2c_1_susi",
"replaces": "MySignUpSignInPolicyId",
"description": "The sign-in and sign-up policy ID for this project (use with IndividualB2C auth)."
},
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/appsettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/appsettings.json
index 9509ba29c432..e2b8fc294a06 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/appsettings.json
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/appsettings.json
@@ -1,15 +1,20 @@
{
////#if (IndividualB2CAuth)
+///*
+The following identity settings need to be configured
+before the project can be successfully executed.
+For more info see https:////aka.ms/dotnet-template-ms-identity-platform
+//*/
// "AzureAdB2C": {
-// "Instance": "https:////login.microsoftonline.com/tfp/",
+// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
-// "Scopes": "api-scope",
// "ClientCertificates" : [
// ],
//#endif
+// "Scopes": "api-scope",
// "SignUpSignInPolicyId": "MySignUpSignInPolicyId"
// },
////#elseif (OrganizationalAuth)
@@ -33,11 +38,12 @@ For more info see https:////aka.ms/dotnet-template-ms-identity-platform
// "ClientCertificates" : [
// ],
//#endif
+// "Scopes": "api-scope",
// "CallbackPath": "/signin-oidc"
// },
////#endif
////#if (GenerateApiOrGraph)
-// "DownstreamAPI": {
+// "DownstreamApi": {
// /*
// 'Scopes' contains space separated scopes of the Web API you want to call. This can be:
// - a scope for a V2 application (for instance api://b3682cc7-8b30-4bd2-aaba-080c6bf0fd31/access_as_user)