AspNetCore.Docs/aspnetcore/host-and-deploy/blazor/index.md

2.2 KiB

title author description monikerRange ms.author ms.custom ms.date uid
Host and deploy Blazor guardrex Discover how to host and deploy Blazor apps. >= aspnetcore-3.0 riande mvc 05/23/2019 host-and-deploy/blazor/index

Host and deploy Blazor

By Luke Latham, Rainer Stropek, and Daniel Roth

Publish the app

Apps are published for deployment in Release configuration.

Visual Studio

  1. Select Build > Publish {APPLICATION} from the navigation bar.
  2. Select the publish target. To publish locally, select Folder.
  3. Accept the default location in the Choose a folder field or specify a different location. Select the Publish button.

Visual Studio Code / .NET Core CLI

Use the dotnet publish command to publish the app with a Release configuration:

dotnet publish -c Release

Publishing the app triggers a restore of the project's dependencies and builds the project before creating the assets for deployment. As part of the build process, unused methods and assemblies are removed to reduce app download size and load times.

A Blazor client-side app is published to the /bin/Release/{TARGET FRAMEWORK}/publish/{ASSEMBLY NAME}/dist folder. A Blazor server-side app is published to the /bin/Release/{TARGET FRAMEWORK}/publish folder.

The assets in the folder are deployed to the web server. Deployment might be a manual or automated process depending on the development tools in use.

Deployment

For deployment guidance, see the following topics:

Blazor serverless hosting with Azure Storage

Blazor client-side apps can be served from Azure Storage as static content directly from a storage container.

For more information, see Host and deploy Blazor client-side (Standalone deployment): Azure Storage.