Skip to content

Commit 2bf19d7

Browse files
authored
Updates
1 parent f92aec2 commit 2bf19d7

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

  • aspnetcore/blazor/host-and-deploy

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

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,31 @@ Apps are published for deployment in Release configuration.
3333
1. To clean the target's publish folder prior to publishing the app, select **Show all settings**. Select **Settings** > **File Publish Options** > **Delete all existing files prior to publish**. Select **Save**.
3434
1. Select the **Publish** button.
3535

36+
# [Visual Studio Code](#tab/visual-studio-code)
37+
38+
Open a command shell to the project's root directory.
39+
40+
Use the [`dotnet publish`](/dotnet/core/tools/dotnet-publish) command to publish the app:
41+
42+
```dotnetcli
43+
dotnet publish -c Release
44+
```
45+
3646
# [.NET CLI](#tab/net-cli)
3747

38-
Use the [`dotnet publish`](/dotnet/core/tools/dotnet-publish) command to publish the app with a Release configuration:
48+
Use the [`dotnet publish`](/dotnet/core/tools/dotnet-publish) command to publish the app:
3949

4050
```dotnetcli
4151
dotnet publish -c Release
4252
```
4353

44-
The `dotnet publish` command generates the necessary files for deployment based on the current state of the project and places the files into the specified output folder. The command doesn't automatically clean the target folder before publishing the app.
54+
---
55+
56+
Publishing the app triggers a [restore](/dotnet/core/tools/dotnet-restore) of the project's dependencies and [builds](/dotnet/core/tools/dotnet-build) 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.
57+
58+
## Empty the target publish folder
59+
60+
When using the [`dotnet publish`](/dotnet/core/tools/dotnet-publish) command in a command shell to publish an app, the command generates the necessary files for deployment based on the current state of the project and places the files into the specified output folder. The command doesn't automatically clean the target folder before publishing the app.
4561

4662
To empty the target folder automatically before the app is published, add the following MSBuild target to the app's project file:
4763

@@ -51,10 +67,6 @@ To empty the target folder automatically before the app is published, add the fo
5167
</Target>
5268
```
5369

54-
---
55-
56-
Publishing the app triggers a [restore](/dotnet/core/tools/dotnet-restore) of the project's dependencies and [builds](/dotnet/core/tools/dotnet-build) 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.
57-
5870
## Default publish locations
5971

6072
:::moniker range=">= aspnetcore-8.0"

0 commit comments

Comments
 (0)