Property name | Ddefault value | Description |
---|---|---|
BlazorWasmPrerendering | Set the disable to suppress prerendering. |
|
BlazorWasmPrerenderingRootComponentType | $(RootNamespace).App |
Set the full name (including namespace) of a root component class. |
BlazorWasmPrerenderingRootComponentSelector | #app,app |
Set the DOM element selector for attaching the root component. |
BlazorWasmPrerenderingHeadOutletComponentSelector | head::after |
Set the DOM element selector for attaching the <HeadOutlet> component of the Blazor. |
BlazorWasmPrerenderingOutputStyle | IndexHtmlInSubFolders |
When it is set to AppendHtmlExtension , the page of the URL path foo/bar will be saved as the foo/bar.html instead of the foo/bar/index.html . |
BlazorWasmPrerenderingDeleteLoadingContents | false |
When it is set to true , the "Loading..." contents will be deleted from prerendered output HTML files, and prerendered contents to be visible immediately even before the Blazor WebAssembly runtime has warmed up. |
BlazorWasmPrerenderingUrlPathToExplicitFetch | Set the semicolon-separated URL paths explicitly that are not linked from anywhere, such as easter-egg pages, to be prerendered. | |
BlazorWasmPrerenderingEnvironment | Prerendering |
Set a name of a host environment that can retrieve via IWebHostEnvironment.Environment . |
BlazorWasmPrerenderingEmulateAuthMe | true |
When it is set to true , prerendering server emulates Azure App Services Auth. That means the ULR endpoint "/.auth/me" will return the JSON content {"clientPrincipal":null} |
BlazorWasmPrerenderingLocale | en |
Set a comma-separated locale list such as "en", "ja-JP,en-US", etc., those used when crawling. , (comma) with %2c . |
BlazorWasmPrerenderingMode | Static |
Set the render mode in which Static or WebAssemblyPrerendered . |
BlazorWasmPrerenderingKeepServer | false |
When it is set to true , the dotnet publish command will not be exited, and the prerendering server process will keep running until Ctrl + C is pressed. |
You can specify MSBuild properties and their values inside of a project file (.csproj) like this:
<!-- This is the .csproj file of your Blazor WebAssembly app -->
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
...
<PropertyGroup>
<{Property name 1}>{Property value 1}</{Property name 1}>
<{Property name 2}>{Property value 2}</{Property name 2}>
...
</PropertyGroup>
...
When you execute the dotnet publish
command, you can specify MSBuild properties and their values by the -p
command-line option with -p:{name}={value}
syntax like this:
dotnet publish -c:Release -p:{Property name 1}={Property value 1} -p:{Property name 2}={Property value 2} ...
Warning
If you want to specify a comma-separated value as a property value, you must replace,
(comma) with%2c
.
ex.)dotnet publish -c:Release -p:BlazorWasmPrerenderingLocale=ja%2cen
You can specify MSBuild properties and their values via environment variables of the OS platforms like this:
# An example for PowerShell
> $env:{Property name 1} = "{Property value 1}"
> $env:{Property name 2} = "{Property value 2}"
# An example for Bash
> export {Property name 1}="{Property value 1}"
> export {Property name 2}="{Property value 2}"