You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/blazor/project-structure.md
+37-9Lines changed: 37 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -540,19 +540,27 @@ The project structure of the client-side app in a hosted Blazor Webassembly solu
540
540
541
541
The Blazor script is served as a static web asset with automatic compression and fingerprinting. For more information, see <xref:blazor/fundamentals/static-files>.
542
542
543
-
:::moniker-end
543
+
In a Blazor Web App, the Blazor script is located in the `Components/App.razor` file:
The Blazor script is served from an embedded resource in the ASP.NET Core shared framework.
590
+
579
591
In a Blazor Server app, the Blazor script is located in the `Pages/_Layout.cshtml` file:
580
592
581
593
```html
@@ -586,6 +598,8 @@ In a Blazor Server app, the Blazor script is located in the `Pages/_Layout.cshtm
586
598
587
599
:::moniker range="< aspnetcore-6.0"
588
600
601
+
The Blazor script is served from an embedded resource in the ASP.NET Core shared framework.
602
+
589
603
In a Blazor Server app, the Blazor script is located in the `Pages/_Host.cshtml` file:
590
604
591
605
```html
@@ -594,18 +608,32 @@ In a Blazor Server app, the Blazor script is located in the `Pages/_Host.cshtml`
594
608
595
609
:::moniker-end
596
610
611
+
For a Blazor Web App or a Blazor Server app, the project must contain at least one Razor component file (`.razor`) in order to automatically include the Blazor script when the app is published. If the project doesn't contain at least one Razor component, set the `RequiresAspNetWebAssets` MSBuild property to `true` in the app's project file to include the Blazor script:
For a Blazor Web App or a Blazor Server app, the project must contain at least one Razor component file (`.razor`) in order to automatically include the Blazor script when the app is published. If the project doesn't contain at least one Razor component, set the `RequiresAspNetWebAssets` MSBuild property `true` in the app's project file to include the Blazor script:
625
+
When the app is published, the `{fingerprint}` placeholder is automatically replaced with a unique hash for cache busting.
0 commit comments