-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
Microsoft.NET.Sdk.WebAssembly.Browser.targets
708 lines (616 loc) · 38.7 KB
/
Microsoft.NET.Sdk.WebAssembly.Browser.targets
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
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
<!--
***********************************************************************************************
Microsoft.NET.Sdk.WebAssembly.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0">
<PropertyGroup>
<_UseBlazorDevServer>$(RunArguments.Contains('blazor-devserver.dll').ToString().ToLower())</_UseBlazorDevServer>
</PropertyGroup>
<PropertyGroup Condition="'$(_WebAssemblyUserRunParameters)' == '' and '$(_UseBlazorDevServer)' == 'false'">
<RunCommand Condition="'$(DOTNET_HOST_PATH)' != '' and Exists($(DOTNET_HOST_PATH))">$(DOTNET_HOST_PATH)</RunCommand>
<RunCommand Condition="'$(RunCommand)' == ''">dotnet</RunCommand>
<WasmAppHostDir>$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', 'WasmAppHost'))</WasmAppHostDir>
<_RunWorkingDirectory>$(OutputPath)</_RunWorkingDirectory>
<_RunWorkingDirectory Condition="'$(_RunWorkingDirectory)' != '' and !$([System.IO.Path]::IsPathRooted($(_RunWorkingDirectory)))">$([System.IO.Path]::Combine($(MSBuildProjectDirectory), $(_RunWorkingDirectory)))</_RunWorkingDirectory>
<_RuntimeConfigJsonPath>$([MSBuild]::NormalizePath($(_RunWorkingDirectory), '$(AssemblyName).runtimeconfig.json'))</_RuntimeConfigJsonPath>
<RunArguments>exec "$([MSBuild]::NormalizePath($(WasmAppHostDir), 'WasmAppHost.dll'))" --use-staticwebassets --runtime-config "$(_RuntimeConfigJsonPath)" $(WasmHostArguments)</RunArguments>
<RunWorkingDirectory>$(_RunWorkingDirectory)</RunWorkingDirectory>
</PropertyGroup>
<PropertyGroup>
<EnableDefaultContentItems Condition=" '$(EnableDefaultContentItems)' == '' ">true</EnableDefaultContentItems>
<!-- Trimmer defaults that depend on user-definable settings.
This must be configured before it's initialized in the .NET SDK targets (which are imported by the Razor SDK). -->
<SuppressTrimAnalysisWarnings Condition="'$(SuppressTrimAnalysisWarnings)' == '' And '$(TrimmerDefaultAction)' != 'link'">true</SuppressTrimAnalysisWarnings>
</PropertyGroup>
<!--
Targets supporting Razor MSBuild integration. Contain support for generating C# code using Razor
and including the generated code in the project lifecycle, including compiling, publishing and producing
nuget packages.
-->
<PropertyGroup>
<!-- Paths to tools, tasks, and extensions are calculated relative to the WebAssemblySdkDirectoryRoot. This can be modified to test a local build. -->
<WebAssemblySdkDirectoryRoot Condition="'$(WebAssemblySdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\</WebAssemblySdkDirectoryRoot>
<_WebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0</_WebAssemblySdkTasksTFM>
<_WebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472</_WebAssemblySdkTasksTFM>
<_WebAssemblySdkTasksAssembly>$(WebAssemblySdkDirectoryRoot)tools\$(_WebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.dll</_WebAssemblySdkTasksAssembly>
<!-- Compression -->
<CompressionIncludePatterns>$(CompressionIncludePatterns);_framework\**</CompressionIncludePatterns>
<DisableBuildCompression Condition="'$(WasmBuildingForNestedPublish)' == 'true'">true</DisableBuildCompression>
</PropertyGroup>
<UsingTask TaskName="Microsoft.NET.Sdk.WebAssembly.GenerateWasmBootJson" AssemblyFile="$(_WebAssemblySdkTasksAssembly)" />
<UsingTask TaskName="Microsoft.NET.Sdk.WebAssembly.ComputeWasmBuildAssets" AssemblyFile="$(_WebAssemblySdkTasksAssembly)" />
<UsingTask TaskName="Microsoft.NET.Sdk.WebAssembly.ComputeWasmPublishAssets" AssemblyFile="$(_WebAssemblySdkTasksAssembly)" />
<UsingTask TaskName="Microsoft.NET.Sdk.WebAssembly.ConvertDllsToWebCil" AssemblyFile="$(_WebAssemblySdkTasksAssembly)" />
<PropertyGroup>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- Runtime feature defaults to trim unnecessary code -->
<InvariantTimezone Condition="'$(BlazorEnableTimeZoneSupport)' == 'false'">true</InvariantTimezone>
<BlazorCacheBootResources Condition="'$(BlazorCacheBootResources)' == ''">true</BlazorCacheBootResources>
<!-- Turn off parts of the build that do not apply to WASM projects -->
<GenerateDependencyFile>false</GenerateDependencyFile>
<PreserveCompilationContext>false</PreserveCompilationContext>
<PreserveCompilationReferences>false</PreserveCompilationReferences>
<IsWebConfigTransformDisabled>true</IsWebConfigTransformDisabled>
<EnableDefaultWasmAssembliesToBundle>false</EnableDefaultWasmAssembliesToBundle>
<WasmNestedPublishAppDependsOn>_GatherWasmFilesToPublish;$(WasmNestedPublishAppDependsOn)</WasmNestedPublishAppDependsOn>
<_WasmNestedPublishAppPreTarget>ComputeFilesToPublish</_WasmNestedPublishAppPreTarget>
</PropertyGroup>
<ItemGroup>
<!-- Configuration for the platform compatibility analyzer. See https://github.com/dotnet/designs/blob/main/accepted/2020/platform-exclusion/platform-exclusion.md#build-configuration-for-platforms -->
<SupportedPlatform Remove="@(SupportedPlatform)" />
<SupportedPlatform Include="browser" />
</ItemGroup>
<!-- Wire-up static web assets -->
<PropertyGroup>
<!-- Static Web Assets -->
<ResolveStaticWebAssetsInputsDependsOn>
$(ResolveStaticWebAssetsInputsDependsOn);
_AddWasmStaticWebAssets;
</ResolveStaticWebAssetsInputsDependsOn>
<ResolvePublishStaticWebAssetsDependsOn Condition="'$(WasmBuildingForNestedPublish)' != 'true'">
$(ResolvePublishStaticWebAssetsDependsOn);
ProcessPublishFilesForWasm;
ComputeWasmExtensions;
_AddPublishWasmBootJsonToStaticWebAssets;
</ResolvePublishStaticWebAssetsDependsOn>
<GenerateStaticWebAssetsPublishManifestDependsOn Condition="'$(WasmBuildingForNestedPublish)' != 'true'">
$(GenerateStaticWebAssetsPublishManifestDependsOn);
GeneratePublishWasmBootJson;
</GenerateStaticWebAssetsPublishManifestDependsOn>
<!-- Compression -->
<ResolveCompressedFilesDependsOn>
$(ResolveCompressedFilesDependsOn);
ResolveWasmOutputs;
_GenerateBuildWasmBootJson;
_AddWasmStaticWebAssets;
</ResolveCompressedFilesDependsOn>
<ResolveCompressedFilesForPublishDependsOn Condition="'$(WasmBuildingForNestedPublish)' != 'true'">
$(ResolveCompressedFilesForPublishDependsOn);
ProcessPublishFilesForWasm;
ComputeWasmExtensions;
GeneratePublishWasmBootJson;
_AddPublishWasmBootJsonToStaticWebAssets;
</ResolveCompressedFilesForPublishDependsOn>
<CompressFilesForPublishDependsOn Condition="'$(WasmBuildingForNestedPublish)' != 'true'">
$(CompressFilesForPublishDependsOn);
GeneratePublishWasmBootJson;
</CompressFilesForPublishDependsOn>
<!-- Wasm -->
<AddWasmStaticWebAssetsDependsOn>
ResolveWasmOutputs;
_GenerateBuildWasmBootJson;
$(AddWasmStaticWebAssetsDependsOn);
</AddWasmStaticWebAssetsDependsOn>
<GenerateBuildWasmBootJsonDependsOn>
$(GenerateBuildWasmBootJsonDependsOn);
ResolveWasmOutputs;
</GenerateBuildWasmBootJsonDependsOn>
</PropertyGroup>
<Target Name="_WasmNativeForBuild" DependsOnTargets="_GatherWasmFilesToBuild;WasmBuildApp" Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'" />
<Target Name="_GatherWasmFilesToBuild">
<ItemGroup>
<WasmAssembliesToBundle Remove="@(WasmAssembliesToBundle)" />
<WasmAssembliesToBundle Include="@(IntermediateAssembly)" />
<WasmAssembliesToBundle Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll'" />
</ItemGroup>
</Target>
<Target Name="_ResolveGlobalizationConfiguration">
<Error Condition="'$(BlazorIcuDataFileName)' != '' AND !$([System.IO.Path]::GetFileName('$(BlazorIcuDataFileName)').StartsWith('icudt'))" Text="File name in %24(BlazorIcuDataFileName) has to start with 'icudt'." />
<Warning Condition="'$(InvariantGlobalization)' == 'true' AND '$(BlazorWebAssemblyLoadAllGlobalizationData)' == 'true'" Text="%24(BlazorWebAssemblyLoadAllGlobalizationData) has no effect when %24(InvariantGlobalization) is set to true." />
<Warning Condition="'$(HybridGlobalization)' == 'true' AND '$(BlazorWebAssemblyLoadAllGlobalizationData)' == 'true'" Text="%24(BlazorWebAssemblyLoadAllGlobalizationData) has no effect when %24(HybridGlobalization) is set to true." />
<Warning Condition="'$(InvariantGlobalization)' == 'true' AND '$(BlazorIcuDataFileName)' != ''" Text="%24(BlazorIcuDataFileName) has no effect when %24(InvariantGlobalization) is set to true." />
<Warning Condition="'$(BlazorWebAssemblyLoadAllGlobalizationData)' == 'true' AND '$(BlazorIcuDataFileName)' != ''" Text="%24(BlazorIcuDataFileName) has no effect when %24(BlazorWebAssemblyLoadAllGlobalizationData) is set to true." />
<Warning Condition="'$(InvariantGlobalization)' == 'true' AND '$(HybridGlobalization)' == 'true'" Text="%24(HybridGlobalization) has no effect when %24(InvariantGlobalization) is set to true." />
<Warning Condition="'$(BlazorIcuDataFileName)' != '' AND '$(HybridGlobalization)' == 'true'" Text="%24(HybridGlobalization) has no effect when %24(BlazorIcuDataFileName) is set." />
<PropertyGroup>
<_RuntimePackDir>$(MicrosoftNetCoreAppRuntimePackDir)</_RuntimePackDir>
<_RuntimePackDir Condition="'$(_RuntimePackDir)' == ''">%(ResolvedRuntimePack.PackageDirectory)</_RuntimePackDir>
<_RuntimePackNativeDir>$([MSBuild]::NormalizeDirectory($(_RuntimePackDir), 'runtimes', 'browser-wasm', 'native'))</_RuntimePackNativeDir>
<_LoadCustomIcuData Condition="'$(InvariantGlobalization)' != 'true' AND '$(HybridGlobalization)' != 'true' AND '$(BlazorWebAssemblyLoadAllGlobalizationData)' != 'true' AND '$(BlazorIcuDataFileName)' != ''">true</_LoadCustomIcuData>
<_LoadCustomIcuData Condition="'$(_LoadCustomIcuData)' == ''">false</_LoadCustomIcuData>
<_BlazorIcuDataFileName Condition="'$(_LoadCustomIcuData)' == 'true' AND Exists('$(BlazorIcuDataFileName)')">$(BlazorIcuDataFileName)</_BlazorIcuDataFileName>
<_BlazorIcuDataFileName Condition="'$(_LoadCustomIcuData)' == 'true' AND !Exists('$(BlazorIcuDataFileName)') AND !$([System.IO.Path]::IsPathRooted($(BlazorIcuDataFileName)))">$(_RuntimePackNativeDir)$(BlazorIcuDataFileName)</_BlazorIcuDataFileName>
<_IsHybridGlobalization Condition="'$(InvariantGlobalization)' != 'true' AND '$(_LoadCustomIcuData)' != 'true'">$(HybridGlobalization)</_IsHybridGlobalization>
<_IsHybridGlobalization Condition="'$(_IsHybridGlobalization)' == ''">false</_IsHybridGlobalization>
<_BlazorWebAssemblyLoadAllGlobalizationData Condition="'$(InvariantGlobalization)' != 'true' AND '$(HybridGlobalization)' != 'true'">$(BlazorWebAssemblyLoadAllGlobalizationData)</_BlazorWebAssemblyLoadAllGlobalizationData>
<_BlazorWebAssemblyLoadAllGlobalizationData Condition="'$(_BlazorWebAssemblyLoadAllGlobalizationData)' == ''">false</_BlazorWebAssemblyLoadAllGlobalizationData>
</PropertyGroup>
<ItemGroup Condition="'$(_LoadCustomIcuData)' == 'true' AND Exists('$(BlazorIcuDataFileName)')">
<!-- if ICU comes from runtime pack then it is already included in ReferenceCopyLocalPaths -->
<ReferenceCopyLocalPaths Include="$(_BlazorIcuDataFileName)" />
</ItemGroup>
<ItemGroup Condition="'$(_IsHybridGlobalization)' == 'true' AND Exists('$(_RuntimePackNativeDir)dotnet.globalization.js')">
<WasmNativeAsset Include="$(_RuntimePackNativeDir)dotnet.globalization.js"/>
</ItemGroup>
<Error Condition="'$(_LoadCustomIcuData)' == 'true' AND !Exists('$(_BlazorIcuDataFileName)')" Text="Could not find %24(BlazorIcuDataFileName)=$(BlazorIcuDataFileName), or when used as a path relative to the runtime pack (='$(_RuntimePackNativeDir)')."/>
</Target>
<Target Name="_ResolveWasmConfiguration" DependsOnTargets="_ResolveGlobalizationConfiguration">
<PropertyGroup>
<_TargetingNET80OrLater>false</_TargetingNET80OrLater>
<_TargetingNET80OrLater Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))">true</_TargetingNET80OrLater>
<_TargetingNET90OrLater Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '9.0'))">true</_TargetingNET90OrLater>
<_BlazorEnableTimeZoneSupport>$(BlazorEnableTimeZoneSupport)</_BlazorEnableTimeZoneSupport>
<_BlazorEnableTimeZoneSupport Condition="'$(_BlazorEnableTimeZoneSupport)' == ''">true</_BlazorEnableTimeZoneSupport>
<_WasmInvariantGlobalization>$(InvariantGlobalization)</_WasmInvariantGlobalization>
<_WasmInvariantGlobalization Condition="'$(_WasmInvariantGlobalization)' == ''">true</_WasmInvariantGlobalization>
<_WasmCopyOutputSymbolsToOutputDirectory>$(CopyOutputSymbolsToOutputDirectory)</_WasmCopyOutputSymbolsToOutputDirectory>
<_WasmCopyOutputSymbolsToOutputDirectory Condition="'$(_WasmCopyOutputSymbolsToOutputDirectory)'==''">true</_WasmCopyOutputSymbolsToOutputDirectory>
<_WasmEnableThreads>$(WasmEnableThreads)</_WasmEnableThreads>
<_WasmEnableThreads Condition="'$(_WasmEnableThreads)' == ''">false</_WasmEnableThreads>
<_WasmEnableWebcil>$(WasmEnableWebcil)</_WasmEnableWebcil>
<_WasmEnableWebcil Condition="'$(_TargetingNET80OrLater)' != 'true'">false</_WasmEnableWebcil>
<_WasmEnableWebcil Condition="'$(_WasmEnableWebcil)' == ''">true</_WasmEnableWebcil>
<_BlazorWebAssemblyStartupMemoryCache>$(BlazorWebAssemblyStartupMemoryCache)</_BlazorWebAssemblyStartupMemoryCache>
<_BlazorWebAssemblyJiterpreter>$(BlazorWebAssemblyJiterpreter)</_BlazorWebAssemblyJiterpreter>
<_BlazorWebAssemblyRuntimeOptions>$(BlazorWebAssemblyRuntimeOptions)</_BlazorWebAssemblyRuntimeOptions>
<_WasmFingerprintAssets>$(WasmFingerprintAssets)</_WasmFingerprintAssets>
<_WasmFingerprintAssets Condition="'$(_WasmFingerprintAssets)' == '' and '$(_TargetingNET90OrLater)' == 'true'">true</_WasmFingerprintAssets>
<_WasmFingerprintAssets Condition="'$(_WasmFingerprintAssets)' == ''">false</_WasmFingerprintAssets>
<_WasmFingerprintDotnetJs>$(WasmFingerprintDotnetJs)</_WasmFingerprintDotnetJs>
<_WasmFingerprintDotnetJs Condition="'$(_WasmFingerprintDotnetJs)' == ''">false</_WasmFingerprintDotnetJs>
<_WasmBootConfigFileName>$(WasmBootConfigFileName)</_WasmBootConfigFileName>
<_WasmBootConfigFileName Condition="'$(_WasmBootConfigFileName)' == ''">blazor.boot.json</_WasmBootConfigFileName>
<_WasmPublishBootConfigFileName>publish.$(_WasmBootConfigFileName)</_WasmPublishBootConfigFileName>
<!-- Workaround for https://github.com/dotnet/sdk/issues/12114-->
<PublishDir Condition="'$(AppendRuntimeIdentifierToOutputPath)' != 'true' AND '$(PublishDir)' == '$(OutputPath)$(RuntimeIdentifier)\$(PublishDirName)\'">$(OutputPath)$(PublishDirName)\</PublishDir>
</PropertyGroup>
</Target>
<Target Name="ResolveWasmOutputs" DependsOnTargets="_ResolveWasmOutputs" />
<Target Name="_GetWasmRuntimePackVersion">
<PropertyGroup>
<_WasmRuntimePackVersion>%(ResolvedRuntimePack.NuGetPackageVersion)</_WasmRuntimePackVersion>
</PropertyGroup>
<Error Code="WASM0005" Text="Unable to resolve WebAssembly runtime pack version" Condition="'$(_WasmRuntimePackVersion)' == ''" />
</Target>
<Target Name="_ResolveWasmOutputs" DependsOnTargets="ResolveReferences;PrepareResourceNames;ComputeIntermediateSatelliteAssemblies;_ResolveWasmConfiguration;_WasmNativeForBuild;_GetWasmRuntimePackVersion">
<PropertyGroup>
<_WasmNativeAssetFileNames>;@(WasmNativeAsset->'%(FileName)%(Extension)');</_WasmNativeAssetFileNames>
</PropertyGroup>
<ItemGroup>
<_WasmConfigFileCandidates Include="@(StaticWebAsset)" Condition="'%(SourceType)' == 'Discovered'" />
<!-- Remove dotnet.js/wasm from runtime pack, in favor of the relinked ones in @(WasmNativeAsset) -->
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="$(_WasmNativeAssetFileNames.Contains(';%(FileName)%(Extension);'))" />
</ItemGroup>
<PropertyGroup>
<_WasmEmitSourceMapBuild>$(WasmEmitSourceMap)</_WasmEmitSourceMapBuild>
<_WasmEmitSourceMapBuild Condition="'$(_WasmEmitSourceMapBuild)' == ''">true</_WasmEmitSourceMapBuild>
</PropertyGroup>
<ComputeWasmBuildAssets
Candidates="@(ReferenceCopyLocalPaths->Distinct());@(WasmNativeAsset)"
CustomIcuCandidate="$(_BlazorIcuDataFileName)"
ProjectAssembly="@(IntermediateAssembly)"
ProjectDebugSymbols="@(_DebugSymbolsIntermediatePath)"
SatelliteAssemblies="@(ReferenceSatellitePaths)"
ProjectSatelliteAssemblies="@(IntermediateSatelliteAssembliesWithTargetPath)"
TimeZoneSupport="$(_BlazorEnableTimeZoneSupport)"
InvariantGlobalization="$(_WasmInvariantGlobalization)"
HybridGlobalization="$(_IsHybridGlobalization)"
LoadFullICUData="$(_BlazorWebAssemblyLoadAllGlobalizationData)"
CopySymbols="$(_WasmCopyOutputSymbolsToOutputDirectory)"
OutputPath="$(OutputPath)"
EnableThreads="$(_WasmEnableThreads)"
EmitSourceMap="$(_WasmEmitSourceMapBuild)"
FingerprintAssets="$(_WasmFingerprintAssets)"
FingerprintDotnetJs="$(_WasmFingerprintDotnetJs)"
>
<Output TaskParameter="AssetCandidates" ItemName="_BuildAssetsCandidates" />
<Output TaskParameter="FilesToRemove" ItemName="_WasmBuildFilesToRemove" />
</ComputeWasmBuildAssets>
<PropertyGroup>
<_WasmBuildWebCilPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'webcil'))</_WasmBuildWebCilPath>
<_WasmBuildTmpWebCilPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'tmp-webcil'))</_WasmBuildTmpWebCilPath>
<_WasmBuildOuputPath>$([MSBuild]::NormalizeDirectory('$(OutputPath)', 'wwwroot'))</_WasmBuildOuputPath>
</PropertyGroup>
<ConvertDllsToWebCil Candidates="@(_BuildAssetsCandidates)" IntermediateOutputPath="$(_WasmBuildTmpWebCilPath)" OutputPath="$(_WasmBuildWebCilPath)" IsEnabled="$(_WasmEnableWebcil)">
<Output TaskParameter="WebCilCandidates" ItemName="_WebCilAssetsCandidates" />
<Output TaskParameter="FileWrites" ItemName="FileWrites" />
</ConvertDllsToWebCil>
<ItemGroup>
<_WasmFingerprintPatterns Include="WasmFiles" Pattern="*.wasm" Expression="#[.{fingerprint}]!" />
<_WasmFingerprintPatterns Include="DllFiles" Pattern="*.dll" Expression="#[.{fingerprint}]!" />
<_WasmFingerprintPatterns Include="DatFiles" Pattern="*.dat" Expression="#[.{fingerprint}]!" />
<_WasmFingerprintPatterns Include="Pdb" Pattern="*.pdb" Expression="#[.{fingerprint}]!" />
</ItemGroup>
<DefineStaticWebAssets
CandidateAssets="@(_WebCilAssetsCandidates)"
SourceId="$(PackageId)"
SourceType="Computed"
AssetKind="Build"
AssetRole="Primary"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="Never"
ContentRoot="$(_WasmBuildOuputPath)"
FingerprintCandidates="$(_WasmFingerprintAssets)"
FingerprintPatterns="@(FingerprintPatterns);@(_WasmFingerprintPatterns)"
BasePath="$(StaticWebAssetBasePath)"
>
<Output TaskParameter="Assets" ItemName="WasmStaticWebAsset" />
</DefineStaticWebAssets>
<DefineStaticWebAssets
CandidateAssets="@(_WasmConfigFileCandidates)"
AssetTraitName="WasmResource"
AssetTraitValue="settings"
RelativePathFilter="appsettings*.json"
>
<Output TaskParameter="Assets" ItemName="_WasmJsConfigStaticWebAsset" />
</DefineStaticWebAssets>
<DefineStaticWebAssetEndpoints
CandidateAssets="@(_WasmJsConfigStaticWebAsset)"
ExistingEndpoints="@(StaticWebAssetEndpoint)"
ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"
>
<Output TaskParameter="Endpoints" ItemName="_WasmJsConfigStaticWebAssetEndpoint" />
</DefineStaticWebAssetEndpoints>
<ItemGroup>
<!-- Update the boot config static web asset since we've given it a trait -->
<StaticWebAsset Remove="@(_WasmJsConfigStaticWebAsset)" />
<StaticWebAsset Include="@(_WasmJsConfigStaticWebAsset)" />
<StaticWebAssetEndpoint Include="@(_WasmJsConfigStaticWebAssetEndpoint)" />
<ReferenceCopyLocalPaths Remove="@(_WasmBuildFilesToRemove)" />
</ItemGroup>
</Target>
<Target Name="_AddWasmStaticWebAssets" DependsOnTargets="$(AddWasmStaticWebAssetsDependsOn)">
<ItemGroup>
<StaticWebAsset Include="@(WasmStaticWebAsset)" />
<StaticWebAsset Include="@(_BuildWasmBootJsonStaticWebAsset)" />
<StaticWebAssetEndpoint Include="@(WasmStaticWebAssetEndpoint)" />
<StaticWebAssetEndpoint Include="@(_BuildWasmBootJsonStaticWebAssetEndpoint)" />
</ItemGroup>
</Target>
<Target Name="_GenerateBuildWasmBootJson" DependsOnTargets="$(GenerateBuildWasmBootJsonDependsOn)">
<PropertyGroup>
<_WasmBuildBootJsonPath>$(IntermediateOutputPath)$(_WasmBootConfigFileName)</_WasmBuildBootJsonPath>
</PropertyGroup>
<ItemGroup>
<_WasmJsModuleCandidatesForBuild
Include="@(StaticWebAsset)"
Condition="'%(StaticWebAsset.AssetTraitName)' == 'JSModule' and '%(StaticWebAsset.AssetTraitValue)' == 'JSLibraryModule' and '%(AssetKind)' != 'Publish'" />
</ItemGroup>
<FilterStaticWebAssetEndpoints Condition="'@(_WasmJsModuleCandidatesForBuild)' != ''"
Endpoints="@(StaticWebAssetEndpoint)"
Assets="@(_WasmJsModuleCandidatesForBuild)"
Filters=""
>
<Output TaskParameter="FilteredEndpoints" ItemName="_WasmJsModuleCandidatesForBuildEndpoint" />
</FilterStaticWebAssetEndpoints>
<DefineStaticWebAssetEndpoints
CandidateAssets="@(WasmStaticWebAsset)"
ExistingEndpoints="@(StaticWebAssetEndpoint)"
ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"
>
<Output TaskParameter="Endpoints" ItemName="WasmStaticWebAssetEndpoint" />
</DefineStaticWebAssetEndpoints>
<ResolveFingerprintedStaticWebAssetEndpointsForAssets
CandidateEndpoints="@(WasmStaticWebAssetEndpoint);@(_WasmJsModuleCandidatesForBuildEndpoint)"
CandidateAssets="@(WasmStaticWebAsset);@(_WasmJsModuleCandidatesForBuild)"
IsStandalone="$(StaticWebAssetStandaloneHosting)"
>
<Output TaskParameter="ResolvedEndpoints" ItemName="_WasmResolvedEndpoints" />
</ResolveFingerprintedStaticWebAssetEndpointsForAssets>
<GenerateWasmBootJson
AssemblyPath="@(IntermediateAssembly)"
Resources="@(WasmStaticWebAsset);@(_WasmJsModuleCandidatesForBuild)"
Endpoints="@(_WasmResolvedEndpoints)"
DebugBuild="true"
DebugLevel="$(WasmDebugLevel)"
LinkerEnabled="false"
CacheBootResources="$(BlazorCacheBootResources)"
OutputPath="$(_WasmBuildBootJsonPath)"
ConfigurationFiles="@(_WasmJsConfigStaticWebAsset)"
LazyLoadedAssemblies="@(BlazorWebAssemblyLazyLoad)"
InvariantGlobalization="$(InvariantGlobalization)"
LoadCustomIcuData="$(_LoadCustomIcuData)"
IsHybridGlobalization="$(_IsHybridGlobalization)"
LoadFullICUData="$(_BlazorWebAssemblyLoadAllGlobalizationData)"
StartupMemoryCache="$(_BlazorWebAssemblyStartupMemoryCache)"
Jiterpreter="$(_BlazorWebAssemblyJiterpreter)"
RuntimeOptions="$(_BlazorWebAssemblyRuntimeOptions)"
Extensions="@(WasmBootConfigExtension)"
TargetFrameworkVersion="$(TargetFrameworkVersion)"
ModuleAfterConfigLoaded="@(WasmModuleAfterConfigLoaded)"
ModuleAfterRuntimeReady="@(WasmModuleAfterRuntimeReady)"
IsPublish="false"
IsAot="$(RunAOTCompilation)"
IsMultiThreaded="$(WasmEnableThreads)"
FingerprintAssets="$(_WasmFingerprintAssets)" />
<ItemGroup>
<FileWrites Include="$(_WasmBuildBootJsonPath)" />
</ItemGroup>
<PropertyGroup>
<_WasmBuildBootJsonPath>$(IntermediateOutputPath)$(_WasmBootConfigFileName)</_WasmBuildBootJsonPath>
</PropertyGroup>
<ItemGroup>
<_BuildWasmBootJson
Include="$(_WasmBuildBootJsonPath)"
RelativePath="_framework/$(_WasmBootConfigFileName)" />
</ItemGroup>
<DefineStaticWebAssets
CandidateAssets="@(_BuildWasmBootJson)"
SourceId="$(PackageId)"
SourceType="Computed"
AssetKind="Build"
AssetRole="Primary"
AssetTraitName="WasmResource"
AssetTraitValue="manifest"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="Never"
ContentRoot="$(OutDir)wwwroot"
BasePath="$(StaticWebAssetBasePath)"
>
<Output TaskParameter="Assets" ItemName="_BuildWasmBootJsonStaticWebAsset" />
</DefineStaticWebAssets>
<DefineStaticWebAssetEndpoints
CandidateAssets="@(_BuildWasmBootJsonStaticWebAsset)"
ExistingEndpoints="@(StaticWebAssetEndpoint)"
ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"
>
<Output TaskParameter="Endpoints" ItemName="_BuildWasmBootJsonStaticWebAssetEndpoint" />
</DefineStaticWebAssetEndpoints>
</Target>
<Target Name="ProvideDefaultUserRuntimeConfig" BeforeTargets="_GenerateRuntimeConfigurationFilesInputCache" Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true'">
<PropertyGroup Condition="!Exists('$(UserRuntimeConfig)')">
<UserRuntimeConfig>$(MSBuildThisFileDirectory)browser.runtimeconfig.template.json</UserRuntimeConfig>
</PropertyGroup>
</Target>
<!-- Publish starts here -->
<!-- Make sure that ResolveAssemblyReferences runs early enough to ensure satellite assemblies are populated in the ResolvedFilesToPublish -->
<Target Name="_WasmPrepareForPublish"
DependsOnTargets="PrepareResourceNames;ComputeIntermediateSatelliteAssemblies;ResolveAssemblyReferences"
BeforeTargets="PrepareForPublish" />
<!-- Wasm's Nested publish is run just to build the native bits. We don't need to run blazor targets for that -->
<Target Name="ProcessPublishFilesForWasm" DependsOnTargets="_ResolveWasmConfiguration;LoadStaticWebAssetsBuildManifest;_GetWasmRuntimePackVersion;_GatherWasmFilesToPublish" AfterTargets="ILLink" Condition="'$(WasmBuildingForNestedPublish)' != 'true'">
<!-- The list of static web assets already contains all the assets from the build. We want to correct certain assets that might
have changed as part of the publish process. We are going to do so as follows:
* We will update Blazor runtime asset dlls if we are running PublishTrimmed
* We will update Blazor native runtime resources if we are using Aot
Other than that, we'll filter the unwanted assets from the list of resolved files to publish in the same way we did during the build.
-->
<ItemGroup>
<_WasmPublishPrefilteredAssets
Include="@(StaticWebAsset)"
Condition="'%(StaticWebAsset.AssetTraitName)' == 'WasmResource' or '%(StaticWebAsset.AssetTraitName)' == 'Culture' or '%(AssetRole)' == 'Alternative'" />
</ItemGroup>
<PropertyGroup>
<_WasmEmitSourceMapPublish>$(WasmEmitSourceMap)</_WasmEmitSourceMapPublish>
<_WasmEmitSourceMapPublish Condition="'$(_WasmEmitSourceMapPublish)' == ''">false</_WasmEmitSourceMapPublish>
</PropertyGroup>
<ItemGroup Condition="@(WasmAssembliesFinal->Count()) == 0 or '$(TargetFrameworkVersion)' == 'v6.0'">
<_WasmResolvedFilesToPublish Include="@(ResolvedFileToPublish)" />
</ItemGroup>
<ItemGroup Condition="@(WasmAssembliesFinal->Count()) > 0 and '$(TargetFrameworkVersion)' != 'v6.0'">
<_WasmResolvedFilesToPublish Include="@(WasmAssembliesFinal)" />
<!-- Ensure we have 'RelativePath' required by ComputeWasmPublishAssets. 9+ version of MonoAOTCompiler is copying this metadata, but when targeting downlevel versions it doesn't. -->
<_WasmResolvedFilesToPublish RelativePath="%(FileName)%(Extension)" Condition="'%(_WasmResolvedFilesToPublish.RelativePath)' == ''" />
<!-- remove the original assemblies -->
<ResolvedFileToPublish Remove="@(WasmAssembliesToBundle)" />
<_WasmResolvedFilesToPublish Include="@(ResolvedFileToPublish)" />
</ItemGroup>
<ComputeWasmPublishAssets
ResolvedFilesToPublish="@(_WasmResolvedFilesToPublish)"
CustomIcuCandidate="$(_BlazorIcuDataFileName)"
TimeZoneSupport="$(_BlazorEnableTimeZoneSupport)"
PublishPath="$(PublishDir)"
WasmAotAssets="@(WasmNativeAsset)"
InvariantGlobalization="$(_WasmInvariantGlobalization)"
HybridGlobalization="$(_IsHybridGlobalization)"
LoadFullICUData="$(_BlazorWebAssemblyLoadAllGlobalizationData)"
CopySymbols="$(CopyOutputSymbolsToPublishDirectory)"
ExistingAssets="@(_WasmPublishPrefilteredAssets)"
EnableThreads="$(_WasmEnableThreads)"
EmitSourceMap="$(_WasmEmitSourceMapPublish)"
IsWebCilEnabled="$(_WasmEnableWebcil)"
FingerprintAssets="$(_WasmFingerprintAssets)"
>
<Output TaskParameter="NewCandidates" ItemName="_NewWasmPublishStaticWebAssets" />
<Output TaskParameter="PromotedAssets" ItemName="_PromotedWasmPublishStaticWebAssets" />
<Output TaskParameter="FilesToRemove" ItemName="_PublishResolvedFilesToRemove" />
</ComputeWasmPublishAssets>
<PropertyGroup>
<_WasmPublishWebCilPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'webcil', 'publish'))</_WasmPublishWebCilPath>
<_WasmPublishTmpWebCilPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'tmp-webcil', 'publish'))</_WasmPublishTmpWebCilPath>
</PropertyGroup>
<ConvertDllsToWebCil Candidates="@(_NewWasmPublishStaticWebAssets)" IntermediateOutputPath="$(_WasmPublishTmpWebCilPath)" OutputPath="$(_WasmPublishWebCilPath)" IsEnabled="$(_WasmEnableWebcil)">
<Output TaskParameter="WebCilCandidates" ItemName="_NewWebCilPublishStaticWebAssetsCandidates" />
<Output TaskParameter="FileWrites" ItemName="FileWrites" />
</ConvertDllsToWebCil>
<!-- _NewWebCilPublishStaticWebAssetsCandidates contain the `Fingerprint` and the `Integrity` from the old assets.
Remove them and call DefineStaticWebAssets so that they can get re-computed appropriately.
-->
<ItemGroup>
<_NewWebCilPublishStaticWebAssetsCandidatesNoMetadata
Include="@(_NewWebCilPublishStaticWebAssetsCandidates)"
RemoveMetadata="Integrity;Fingerprint" />
</ItemGroup>
<DefineStaticWebAssets CandidateAssets="@(_NewWebCilPublishStaticWebAssetsCandidatesNoMetadata);@(_PromotedWasmPublishStaticWebAssets)">
<Output TaskParameter="Assets" ItemName="_NewWebCilPublishStaticWebAssets" />
</DefineStaticWebAssets>
<DefineStaticWebAssetEndpoints
CandidateAssets="@(_NewWebCilPublishStaticWebAssets)"
ExistingEndpoints="@(StaticWebAssetEndpoint)"
ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"
>
<Output TaskParameter="Endpoints" ItemName="_NewWebCilPublishStaticWebAssetsEndpoint" />
</DefineStaticWebAssetEndpoints>
<ItemGroup>
<ResolvedFileToPublish Remove="@(_PublishResolvedFilesToRemove)" />
<StaticWebAsset Include="@(_NewWebCilPublishStaticWebAssets)" />
<StaticWebAssetEndpoint Include="@(_NewWebCilPublishStaticWebAssetsEndpoint)" />
<!-- TODO: Probably doesn't do anything as of now, original https://github.com/dotnet/aspnetcore/pull/34798 -->
<PublishBlazorBootStaticWebAsset
Include="@(StaticWebAsset)"
Condition="'%(AssetKind)' != 'Build' and
(('%(StaticWebAsset.AssetTraitName)' == 'WasmResource' and '%(StaticWebAsset.AssetTraitValue)' != 'manifest' and '%(StaticWebAsset.AssetTraitValue)' != 'boot') or
'%(StaticWebAsset.AssetTraitName)' == 'Culture')" />
</ItemGroup>
</Target>
<Target
Name="ComputeWasmExtensions"
AfterTargets="ProcessPublishFilesForWasm"
DependsOnTargets="$(ComputeBlazorExtensionsDependsOn)" >
<ItemGroup>
<_BlazorExtensionsCandidate Include="@(BlazorPublishExtension->'%(FullPath)')">
<SourceId>$(PackageId)</SourceId>
<SourceType>Computed</SourceType>
<ContentRoot>$(PublishDir)wwwroot</ContentRoot>
<BasePath>$(StaticWebAssetBasePath)</BasePath>
<RelativePath>%(BlazorPublishExtension.RelativePath)</RelativePath>
<AssetKind>Publish</AssetKind>
<AssetMode>All</AssetMode>
<AssetRole>Primary</AssetRole>
<AssetTraitName>WasmResource</AssetTraitName>
<AssetTraitValue>extension:%(BlazorPublishExtension.ExtensionName)</AssetTraitValue>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>%(BlazorPublishExtension.Identity)</OriginalItemSpec>
</_BlazorExtensionsCandidate>
</ItemGroup>
<DefineStaticWebAssets CandidateAssets="@(_BlazorExtensionsCandidate)">
<Output TaskParameter="Assets" ItemName="StaticWebAsset" />
<Output TaskParameter="Assets" ItemName="_BlazorExtensionsCandidatesForPublish" />
<Output TaskParameter="Assets" ItemName="AssetToCompress" />
</DefineStaticWebAssets>
<DefineStaticWebAssetEndpoints
CandidateAssets="@(_BlazorExtensionsCandidatesForPublish)"
ExistingEndpoints="@(StaticWebAssetEndpoint)"
ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"
>
<Output TaskParameter="Endpoints" ItemName="StaticWebAssetEndpoint" />
</DefineStaticWebAssetEndpoints>
</Target>
<Target Name="_AddWasmWebConfigFile" AfterTargets="ILLink">
<ItemGroup Condition="'@(ResolvedFileToPublish->AnyHaveMetadataValue('RelativePath', 'web.config'))' != 'true'">
<ResolvedFileToPublish
Include="$(MSBuildThisFileDirectory)Wasm.web.config"
ExcludeFromSingleFile="true"
CopyToPublishDirectory="PreserveNewest"
RelativePath="web.config" />
</ItemGroup>
</Target>
<Target Name="_AddPublishWasmBootJsonToStaticWebAssets" DependsOnTargets="GeneratePublishWasmBootJson">
<ItemGroup>
<_PublishWasmBootJson
Include="$(IntermediateOutputPath)$(_WasmPublishBootConfigFileName)"
RelativePath="_framework/$(_WasmBootConfigFileName)" />
</ItemGroup>
<DefineStaticWebAssets
CandidateAssets="@(_PublishWasmBootJson)"
SourceId="$(PackageId)"
SourceType="Computed"
AssetKind="Publish"
AssetRole="Primary"
AssetTraitName="WasmResource"
AssetTraitValue="manifest"
CopyToOutputDirectory="Never"
CopyToPublishDirectory="PreserveNewest"
ContentRoot="$(PublishDir)wwwroot"
BasePath="$(StaticWebAssetBasePath)"
>
<Output TaskParameter="Assets" ItemName="StaticWebAsset" />
<Output TaskParameter="Assets" ItemName="_PublishWasmBootJsonStaticWebAsset" />
</DefineStaticWebAssets>
<DefineStaticWebAssetEndpoints
CandidateAssets="@(_PublishWasmBootJsonStaticWebAsset)"
ExistingEndpoints="@(StaticWebAssetEndpoint)"
ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"
>
<Output TaskParameter="Endpoints" ItemName="StaticWebAssetEndpoint" />
</DefineStaticWebAssetEndpoints>
</Target>
<Target Name="GeneratePublishWasmBootJson" DependsOnTargets="$(GeneratePublishWasmBootJsonDependsOn)">
<ItemGroup>
<_WasmPublishAsset
Include="@(StaticWebAsset)"
Condition="'%(AssetKind)' != 'Build' and '%(StaticWebAsset.AssetTraitValue)' != 'manifest' and ('%(StaticWebAsset.AssetTraitName)' == 'WasmResource' or '%(StaticWebAsset.AssetTraitName)' == 'Culture') and '%(StaticWebAsset.AssetTraitValue)' != 'boot'" />
<_WasmPublishConfigFile
Include="@(StaticWebAsset)"
Condition="'%(StaticWebAsset.AssetTraitName)' == 'WasmResource' and '%(StaticWebAsset.AssetTraitValue)' == 'settings'"/>
<_WasmJsModuleCandidatesForPublish
Include="@(StaticWebAsset)"
Condition="'%(StaticWebAsset.AssetTraitName)' == 'JSModule' and '%(StaticWebAsset.AssetTraitValue)' == 'JSLibraryModule' and '%(AssetKind)' != 'Build'" />
</ItemGroup>
<FilterStaticWebAssetEndpoints Condition="'@(_WasmJsModuleCandidatesForPublish)' != ''"
Endpoints="@(StaticWebAssetEndpoint)"
Assets="@(_WasmJsModuleCandidatesForPublish)"
Filters=""
>
<Output TaskParameter="FilteredEndpoints" ItemName="_WasmJsModuleCandidatesForPublishEndpoint" />
</FilterStaticWebAssetEndpoints>
<ResolveFingerprintedStaticWebAssetEndpointsForAssets
CandidateEndpoints="@(StaticWebAssetEndpoint);@(_WasmJsModuleCandidatesForPublishEndpoint)"
CandidateAssets="@(_WasmPublishAsset);@(_WasmJsModuleCandidatesForPublish)"
IsStandalone="$(StaticWebAssetStandaloneHosting)"
>
<Output TaskParameter="ResolvedEndpoints" ItemName="_WasmResolvedEndpointsForPublish" />
</ResolveFingerprintedStaticWebAssetEndpointsForAssets>
<GenerateWasmBootJson
AssemblyPath="@(IntermediateAssembly)"
Resources="@(_WasmPublishAsset);@(_WasmJsModuleCandidatesForPublish)"
Endpoints="@(_WasmResolvedEndpointsForPublish)"
DebugBuild="false"
DebugLevel="$(WasmDebugLevel)"
LinkerEnabled="$(PublishTrimmed)"
CacheBootResources="$(BlazorCacheBootResources)"
OutputPath="$(IntermediateOutputPath)$(_WasmPublishBootConfigFileName)"
ConfigurationFiles="@(_WasmPublishConfigFile)"
LazyLoadedAssemblies="@(BlazorWebAssemblyLazyLoad)"
InvariantGlobalization="$(InvariantGlobalization)"
LoadCustomIcuData="$(_LoadCustomIcuData)"
IsHybridGlobalization="$(_IsHybridGlobalization)"
LoadFullICUData="$(_BlazorWebAssemblyLoadAllGlobalizationData)"
StartupMemoryCache="$(_BlazorWebAssemblyStartupMemoryCache)"
Jiterpreter="$(_BlazorWebAssemblyJiterpreter)"
RuntimeOptions="$(_BlazorWebAssemblyRuntimeOptions)"
Extensions="@(WasmBootConfigExtension)"
TargetFrameworkVersion="$(TargetFrameworkVersion)"
ModuleAfterConfigLoaded="@(WasmModuleAfterConfigLoaded)"
ModuleAfterRuntimeReady="@(WasmModuleAfterRuntimeReady)"
IsPublish="true"
IsAot="$(RunAOTCompilation)"
IsMultiThreaded="$(WasmEnableThreads)"
FingerprintAssets="$(_WasmFingerprintAssets)" />
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)$(_WasmPublishBootConfigFileName)" />
</ItemGroup>
</Target>
<Target Name="_WasmNative"
DependsOnTargets="_EnsureWasmRuntimeWorkload;WasmTriggerPublishApp"
BeforeTargets="ProcessPublishFilesForWasm"
Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'" />
<Target Name="_EnsureWasmRuntimeWorkload" Condition="'$(UsingBlazorAOTWorkloadManifest)' != 'true'">
<Error
Text="Publishing with AOT enabled requires the .NET WebAssembly AOT workload to be installed. To learn more, visit https://aka.ms/AAb4uzl."
Code="BLAZORSDK1002" />
</Target>
<!-- called twice, once in the regular publish, and the other in the nested publish -->
<Target Name="_GatherWasmFilesToPublish">
<ItemGroup>
<WasmAssembliesToBundle Remove="@(WasmAssembliesToBundle)" />
<WasmAssembliesToBundle Include="@(ResolvedFileToPublish)" Exclude="@(_Exclude)" Condition="%(Extension) == '.dll'" />
</ItemGroup>
</Target>
</Project>