1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
|
{
"$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": "(!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)"
}
},
"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
}
]
}
|