| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666 |
- {
- "$schema": "http://json.schemastore.org/template",
- "author": "Microsoft",
- "classifications": [
- "Web",
- "Blazor",
- "WebAssembly",
- "PWA"
- ],
- "name": "Blazor WebAssembly App",
- "defaultName": "BlazorApp",
- "description": "A project template for creating a Blazor app that runs on WebAssembly and is optionally hosted by an ASP.NET Core app. This template can be used for web apps with rich dynamic user interfaces (UIs).",
- "groupIdentity": "Microsoft.Web.Blazor.Wasm",
- "precedence": "9000",
- "guids": [
- "4C26868E-5E7C-458D-82E3-040509D0C71F",
- "5990939C-7E7B-4CFA-86FF-44CA5756498A",
- "650B3CE7-2E93-4CC4-9F46-466686815EAA",
- "0AFFA7FD-4E37-4636-AB91-3753E746DB98",
- "09732173-2cef-46b7-83db-1334bcb079d3", // Tenant ID
- "53bc9b9d-9d6a-45d4-8429-2a2761773502" // Client ID
- ],
- "identity": "Microsoft.Web.Blazor.Wasm.CSharp.7.0",
- "thirdPartyNotices": "https://aka.ms/aspnetcore/7.0-third-party-notices",
- "preferNameDirectory": true,
- "primaryOutputs": [
- {
- "condition": "(Hosted && IndividualLocalAuth && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "path": "Server/Readme.txt"
- },
- {
- "condition": "(Hosted && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
- "path": "ComponentsWebAssembly-CSharp.sln"
- },
- {
- "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "path": "Server/ComponentsWebAssembly-CSharp.Server.csproj"
- },
- {
- "condition": "(!Hosted)",
- "path": "ComponentsWebAssembly-CSharp.csproj"
- },
- {
- "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "path": "Client/ComponentsWebAssembly-CSharp.Client.csproj"
- },
- {
- "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "path": "Shared/ComponentsWebAssembly-CSharp.Shared.csproj"
- }
- ],
- "shortName": "blazorwasm",
- "sourceName": "ComponentsWebAssembly-CSharp",
- "sources": [
- {
- "source": "./",
- "target": "./",
- "exclude": [
- ".template.config/**"
- ],
- "copyOnly": [
- "**/wwwroot/css/**"
- ],
- "modifiers": [
- {
- "condition": "(!Hosted)",
- "exclude": [
- "Server/**",
- "Shared/**",
- "*.sln"
- ],
- "rename": {
- ".Client.csproj": ".csproj",
- "Client": "."
- }
- },
- {
- "condition": "(Hosted)",
- "exclude": [
- "Client/wwwroot/sample-data/**"
- ]
- },
- {
- "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "exclude": [
- "*.sln"
- ]
- },
- {
- "condition": "(!PWA)",
- "exclude": [
- "Client/wwwroot/service-worker*.js",
- "Client/wwwroot/manifest.json",
- "Client/wwwroot/icon-512.png"
- ]
- },
- {
- "condition": "(!UseProgramMain)",
- "exclude": [
- "Server/Program.Main.cs",
- "Client/Program.Main.cs"
- ]
- },
- {
- "condition": "(UseProgramMain)",
- "exclude": [
- "Server/Program.cs",
- "Client/Program.cs"
- ],
- "rename": {
- "Server/Program.Main.cs": "Server/Program.cs",
- "Client/Program.Main.cs": "Client/Program.cs"
- }
- },
- {
- "condition": "(!IndividualLocalAuth || UseLocalDB)",
- "exclude": [
- "Server/app.db"
- ]
- },
- {
- "condition": "(!IndividualLocalAuth)",
- "exclude": [
- "Server/Data/SqlLite/**",
- "Server/Data/SqlServer/**",
- "Server/Data/ApplicationDbContext.cs",
- "Server/Areas/**",
- "Client/wwwroot/appsettings.Development.json"
- ]
- },
- {
- "condition": "(IndividualLocalAuth && UseLocalDB)",
- "rename": {
- "Server/Data/SqlServer/": "Server/Data/Migrations/"
- },
- "exclude": [
- "Server/Data/SqlLite/**"
- ]
- },
- {
- "condition": "(IndividualLocalAuth && !UseLocalDB)",
- "rename": {
- "Server/Data/SqlLite/": "Server/Data/Migrations/"
- },
- "exclude": [
- "Server/Data/SqlServer/**"
- ]
- },
- {
- "condition": "(Hosted && NoAuth)",
- "rename": {
- "Client/Shared/MainLayout.NoAuth.razor": "Client/Shared/MainLayout.razor"
- },
- "exclude": [
- "Client/Pages/Authentication.razor",
- "Client/Shared/LoginDisplay.*.razor",
- "Client/Shared/MainLayout.Auth.razor",
- "Client/Shared/RedirectToLogin.razor",
- "Client/wwwroot/appsettings.Development.json",
- "Client/wwwroot/appsettings.json"
- ]
- },
- {
- "condition": "(Hosted && !NoAuth)",
- "rename": {
- "Client/Shared/MainLayout.Auth.razor": "Client/Shared/MainLayout.razor"
- },
- "exclude": [
- "Client/Shared/MainLayout.NoAuth.razor"
- ]
- },
- {
- "condition": "(Hosted && IndividualLocalAuth)",
- "rename": {
- "Client/Shared/LoginDisplay.IndividualLocalAuth.razor": "Client/Shared/LoginDisplay.razor"
- },
- "exclude": [
- "Client/Shared/LoginDisplay.IndividualMsalAuth.razor",
- "Client/wwwroot/appsettings.json",
- "Client/wwwroot/appsettings.Development.json"
- ]
- },
- {
- "condition": "(Hosted && (IndividualB2CAuth || OrganizationalAuth))",
- "rename": {
- "Client/Shared/LoginDisplay.IndividualMsalAuth.razor": "Client/Shared/LoginDisplay.razor"
- },
- "exclude": [
- "Client/Shared/LoginDisplay.IndividualLocalAuth.razor"
- ]
- },
- {
- "condition": "(!Hosted && NoAuth)",
- "rename": {
- "Client/Shared/MainLayout.NoAuth.razor": "Shared/MainLayout.razor"
- },
- "exclude": [
- "Client/Pages/Authentication.razor",
- "Client/Shared/LoginDisplay.*.razor",
- "Client/Shared/MainLayout.Auth.razor",
- "Client/Shared/RedirectToLogin.razor",
- "Client/wwwroot/appsettings.Development.json",
- "Client/wwwroot/appsettings.json"
- ]
- },
- {
- "condition": "(!Hosted && !NoAuth)",
- "rename": {
- "Client/Shared/MainLayout.Auth.razor": "Shared/MainLayout.razor"
- },
- "exclude": [
- "Client/Shared/MainLayout.NoAuth.razor"
- ]
- },
- {
- "condition": "(!Hosted && IndividualLocalAuth)",
- "rename": {
- "Client/Shared/LoginDisplay.IndividualLocalAuth.razor": "Shared/LoginDisplay.razor"
- },
- "exclude": [
- "Client/Shared/LoginDisplay.IndividualMsalAuth.razor"
- ]
- },
- {
- "condition": "(!Hosted && (IndividualB2CAuth || OrganizationalAuth))",
- "rename": {
- "Client/Shared/LoginDisplay.IndividualMsalAuth.razor": "Shared/LoginDisplay.razor"
- },
- "exclude": [
- "Client/Shared/LoginDisplay.IndividualLocalAuth.razor"
- ]
- },
- {
- "condition": "(!IndividualLocalAuth || !Hosted)",
- "exclude": [
- "Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml",
- "Server/Controllers/OidcConfigurationController.cs",
- "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"
- ]
- }
- ]
- }
- ],
- "symbols": {
- "Framework": {
- "type": "parameter",
- "description": "The target framework for the project.",
- "datatype": "choice",
- "choices": [
- {
- "choice": "net7.0",
- "description": "Target net7.0"
- }
- ],
- "replaces": "net7.0",
- "defaultValue": "net7.0"
- },
- "HostIdentifier": {
- "type": "bind",
- "binding": "HostIdentifier"
- },
- "skipRestore": {
- "type": "parameter",
- "datatype": "bool",
- "description": "If specified, skips the automatic restore of the project on create.",
- "defaultValue": "false"
- },
- "Hosted": {
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "false",
- "displayName": "ASP.NET Core _Hosted",
- "description": "If specified, includes an ASP.NET Core host for the Blazor WebAssembly app."
- },
- "auth": {
- "type": "parameter",
- "datatype": "choice",
- "choices": [
- {
- "choice": "None",
- "description": "No authentication"
- },
- {
- "choice": "Individual",
- "description": "Individual authentication"
- },
- {
- "choice": "IndividualB2C",
- "description": "Individual authentication with Azure AD B2C"
- },
- {
- "choice": "SingleOrg",
- "description": "Organizational authentication for a single tenant"
- }
- ],
- "defaultValue": "None",
- "description": "The type of authentication to use"
- },
- "Authority": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "https://login.microsoftonline.com/",
- "description": "The authority of the OIDC provider (use with standalone Individual auth)."
- },
- "MissingAuthority": {
- "type": "computed",
- "value": "(IndividualAuth && !Hosted && Authority == \"https://login.microsoftonline.com/\" && ClientId == \"33333333-3333-3333-33333333333333333\")"
- },
- "AAdB2CInstance": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "https:////aadB2CInstance.b2clogin.com/",
- "description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
- },
- "SignUpSignInPolicyId": {
- "type": "parameter",
- "datatype": "string",
- "defaultValue": "b2c_1_susi",
- "replaces": "MySignUpSignInPolicyId",
- "description": "The sign-in and sign-up policy ID for this project (use with IndividualB2C auth)."
- },
- "AADInstance": {
- "type": "parameter",
- "datatype": "string",
- "defaultValue": "https://login.microsoftonline.com/",
- "replaces": "https:////login.microsoftonline.com/",
- "description": "The Azure Active Directory instance to connect to (use with SingleOrg auth)."
- },
- "ClientId": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "33333333-3333-3333-33333333333333333",
- "description": "The Client ID for this project (use with IndividualB2C, SingleOrg or Individual auth in standalone scenarios)."
- },
- "Domain": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "qualified.domain.name",
- "description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
- },
- "AppIDUri": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "api.id.uri",
- "description": "The App ID Uri for the server API we want to call (use with SingleOrg or IndividualB2C auth)."
- },
- "APIClientId": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "11111111-1111-1111-11111111111111111",
- "description": "The Client ID for the API that the server hosts (use with IndividualB2C, SingleOrg)."
- },
- "DefaultScope": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "api-scope",
- "defaultValue": "access_as_user",
- "description": "The API scope the client needs to request to provision an access token. (use with IndividualB2C, SingleOrg)."
- },
- "TenantId": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "22222222-2222-2222-2222-222222222222",
- "description": "The TenantId ID of the directory to connect to (use with SingleOrg auth)."
- },
- "OrgReadAccess": {
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "false",
- "description": "Whether or not to allow this application read access to the directory (only applies to SingleOrg)."
- },
- "UserSecretsId": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
- "defaultValue": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
- "description": "The ID to use for secrets (use with OrgReadAccess or Individual auth)."
- },
- "ExcludeLaunchSettings": {
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "false",
- "description": "Whether to exclude launchSettings.json from the generated template."
- },
- "kestrelHttpPort": {
- "type": "parameter",
- "datatype": "integer",
- "description": "Port number to use for the HTTP endpoint in launchSettings.json."
- },
- "kestrelHttpPortGenerated": {
- "type": "generated",
- "generator": "port",
- "parameters": {
- "low": 5000,
- "high": 5300
- }
- },
- "kestrelHttpPortReplacer": {
- "type": "generated",
- "generator": "coalesce",
- "parameters": {
- "sourceVariableName": "kestrelHttpPort",
- "fallbackVariableName": "kestrelHttpPortGenerated"
- },
- "replaces": "5000"
- },
- "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)."
- },
- "kestrelHttpsPortGenerated": {
- "type": "generated",
- "generator": "port",
- "parameters": {
- "low": 7000,
- "high": 7300
- }
- },
- "kestrelHttpsPortReplacer": {
- "type": "generated",
- "generator": "coalesce",
- "parameters": {
- "sourceVariableName": "kestrelHttpsPort",
- "fallbackVariableName": "kestrelHttpsPortGenerated"
- },
- "replaces": "5001"
- },
- "iisHttpPort": {
- "type": "parameter",
- "datatype": "integer",
- "description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json."
- },
- "iisHttpPortGenerated": {
- "type": "generated",
- "generator": "port"
- },
- "iisHttpPortReplacer": {
- "type": "generated",
- "generator": "coalesce",
- "parameters": {
- "sourceVariableName": "iisHttpPort",
- "fallbackVariableName": "iisHttpPortGenerated"
- },
- "replaces": "8080"
- },
- "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)."
- },
- "iisHttpsPortGenerated": {
- "type": "generated",
- "generator": "port",
- "parameters": {
- "low": 44300,
- "high": 44399
- }
- },
- "iisHttpsPortReplacer": {
- "type": "generated",
- "generator": "coalesce",
- "parameters": {
- "sourceVariableName": "iisHttpsPort",
- "fallbackVariableName": "iisHttpsPortGenerated"
- },
- "replaces": "44300"
- },
- "PWA": {
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "false",
- "displayName": "_Progressive Web Application",
- "description": "If specified, produces a Progressive Web Application (PWA) supporting installation and offline use."
- },
- "OrganizationalAuth": {
- "type": "computed",
- "value": "(auth == \"SingleOrg\" || auth == \"MultiOrg\")"
- },
- "MultiOrgAuth": {
- "type": "computed",
- "value": "(auth == \"MultiOrg\")"
- },
- "SingleOrgAuth": {
- "type": "computed",
- "value": "(auth == \"SingleOrg\")"
- },
- "IndividualLocalAuth": {
- "type": "computed",
- "value": "(auth == \"Individual\")"
- },
- "IndividualAuth": {
- "type": "computed",
- "value": "(auth == \"Individual\" || auth == \"IndividualB2C\")"
- },
- "IndividualB2CAuth": {
- "type": "computed",
- "value": "(auth == \"IndividualB2C\")"
- },
- "NoAuth": {
- "type": "computed",
- "value": "(!(IndividualAuth || OrganizationalAuth))"
- },
- "RequiresHttps": {
- "type": "computed",
- "value": "(OrganizationalAuth || IndividualAuth || !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."
- },
- "UseLocalDB": {
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "false",
- "description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified."
- },
- "copyrightYear": {
- "type": "generated",
- "generator": "now",
- "replaces": "copyrightYear",
- "parameters": {
- "format": "yyyy"
- }
- },
- "CalledApiUrl": {
- "type": "parameter",
- "datatype": "string",
- "replaces": "[WebApiUrl]",
- "defaultValue": "https://graph.microsoft.com/v1.0",
- "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."
- },
- "CallsMicrosoftGraph": {
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "false",
- "description": "Specifies if the web app calls Microsoft Graph. This option only applies if --auth SingleOrg or --auth MultiOrg is specified."
- },
- "CalledApiScopes": {
- "type": "parameter",
- "datatype": "string",
- "replaces" : "user.read",
- "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."
- },
- "GenerateApi": {
- "type": "computed",
- "value": "(( (IndividualB2CAuth && !Hosted) || (OrganizationalAuth && Hosted)) && (CalledApiUrl != \"https://graph.microsoft.com/v1.0\" || CalledApiScopes != \"user.read\"))"
- },
- "GenerateGraph": {
- "type": "computed",
- "value": "(OrganizationalAuth && CallsMicrosoftGraph && Hosted)"
- },
- "GenerateApiOrGraph": {
- "type": "computed",
- "value": "(GenerateApi || GenerateGraph)"
- },
- "UseProgramMain": {
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "false",
- "description": "Whether to generate an explicit Program class and Main method instead of top-level statements."
- }
- },
- "tags": {
- "language": "C#",
- "type": "project"
- },
- "postActions": [
- {
- "id": "restore",
- "condition": "(!skipRestore && Hosted)",
- "description": "Restore NuGet packages required by this project.",
- "manualInstructions": [
- {
- "text": "Run 'dotnet restore'"
- }
- ],
- "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
- "continueOnError": true
- },
- {
- "id": "restoreClient",
- "condition": "(!skipRestore && !Hosted)",
- "description": "Restore NuGet packages required by this project.",
- "manualInstructions": [
- {
- "text": "Run 'dotnet restore'"
- }
- ],
- "args": {
- "files": ["ComponentsWebAssembly-CSharp.Client.csproj"]
- },
- "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
- "continueOnError": true
- },
- {
- "id": "open-file",
- "condition": "(IndividualLocalAuth && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "description": "Opens Readme.txt in the editor",
- "manualInstructions": [],
- "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
- "args": {
- "files": "0"
- },
- "continueOnError": true
- }
- ]
- }
|