From 13858a3a5a62cb64952ff4de49555e7fadb92d03 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Thu, 13 Jul 2023 09:21:02 -0400 Subject: [PATCH 1/3] Tooling Pre6 updates --- aspnetcore/blazor/tooling.md | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/aspnetcore/blazor/tooling.md b/aspnetcore/blazor/tooling.md index 4f95245f1d3b..2571f695ecdb 100644 --- a/aspnetcore/blazor/tooling.md +++ b/aspnetcore/blazor/tooling.md @@ -45,10 +45,16 @@ To create a Blazor app on Windows, use the following guidance: :::moniker-end -* Provide a **Project name** and confirm that the **Location** is correct. Select **Next**. +:::moniker range=">= aspnetcore-8.0" + +* Provide a **Project name** and confirm that the **Location** is correct. To enable interactivity using the server render mode, select the **Use interactive server components** checkbox. Select **Next**. + +:::moniker-end :::moniker range="< aspnetcore-8.0" +* Provide a **Project name** and confirm that the **Location** is correct. Select **Next**. + * For a *hosted* Blazor WebAssembly app, select the **ASP.NET Core Hosted** checkbox in the **Additional information** dialog. :::moniker-end @@ -101,6 +107,13 @@ Create a new project: ```dotnetcli dotnet new blazor -o BlazorApp ``` + + To enable interactivity using the server render mode, add the `--use-server`option to the command: + + ```dotnetcli + dotnet new blazor -o BlazorApp --use-server + ``` + * For a Blazor WebAssembly experience with demonstration code and Bootstrap, execute the following command: ```dotnetcli @@ -464,12 +477,24 @@ To create a Blazor app on macOS, use the following guidance: :::moniker range=">= aspnetcore-8.0" -* For a Blazor Web Apps experience (*recommended*), Visual Studio for Mac can't create a Blazor Web App in its UI at this time. Open a command shell with Apple's **Terminal** utility application in macOS's `Applications/Utilities` folder. Change the directory to the location where you want to create the app with the [`ls` command](https://man7.org/linux/man-pages/man1/ls.1.html). For example, use the `ls Desktop` command to change the directory to the desktop. Execute the following command in the command shell: + + +* For a Blazor Web Apps experience (*recommended*), Visual Studio for Mac can't create a Blazor Web App in its UI at this time. + + Install the [.NET 8.0 Preview SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) using the correct macOS installer for your platform architecture (Arm64 or x64). For more information on trusting the ASP.NET Core HTTPS development certificate, see . + + Open a command shell with Apple's **Terminal** utility application in macOS's `Applications/Utilities` folder. Change the directory to the location where you want to create the app with the [`ls` command](https://man7.org/linux/man-pages/man1/ls.1.html). For example, use the `ls Desktop` command to change the directory to the desktop. Execute the following command in the command shell: ```dotnetcli dotnet new blazor -o BlazorApp ``` + To enable interactivity using the server render mode, add the `--use-server`option to the command: + + ```dotnetcli + dotnet new blazor -o BlazorApp --use-server + ``` + After the app is created, open the project file (`BlazorApp.csproj`) with Visual Studio for Mac. > [!NOTE] @@ -513,7 +538,7 @@ For a Blazor Web App experience (*recommended*), choose the **Blazor Web App** t * For a hosted Blazor WebAssembly experience, select the **ASP.NET Core Hosted** checkbox. -:::moniker-end + * In the **Project name** field, name the app `BlazorApp`. Select **Create**. @@ -521,6 +546,8 @@ For a Blazor Web App experience (*recommended*), choose the **Blazor Web App** t If a prompt appears to trust the development certificate, trust the certificate and continue. The user and keychain passwords are required to trust the certificate. For more information on trusting the ASP.NET Core HTTPS development certificate, see . +:::moniker-end + :::moniker range="< aspnetcore-8.0" > [!IMPORTANT] From 7593873adac0ee4581fe2d71c5a66fb79985ad96 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Thu, 13 Jul 2023 09:32:43 -0400 Subject: [PATCH 2/3] Updates --- aspnetcore/blazor/tooling.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/aspnetcore/blazor/tooling.md b/aspnetcore/blazor/tooling.md index 2571f695ecdb..7c77ffb2b450 100644 --- a/aspnetcore/blazor/tooling.md +++ b/aspnetcore/blazor/tooling.md @@ -47,7 +47,9 @@ To create a Blazor app on Windows, use the following guidance: :::moniker range=">= aspnetcore-8.0" -* Provide a **Project name** and confirm that the **Location** is correct. To enable interactivity using the server render mode, select the **Use interactive server components** checkbox. Select **Next**. + + +* Provide a **Project name** and confirm that the **Location** is correct. To enable interactivity with server-side rendering, select the **Use interactive server components** checkbox. Select **Next**. :::moniker-end @@ -108,7 +110,9 @@ Create a new project: dotnet new blazor -o BlazorApp ``` - To enable interactivity using the server render mode, add the `--use-server`option to the command: + + + To enable interactivity with server-side rendering, add the `--use-server` option to the command: ```dotnetcli dotnet new blazor -o BlazorApp --use-server @@ -481,7 +485,7 @@ To create a Blazor app on macOS, use the following guidance: * For a Blazor Web Apps experience (*recommended*), Visual Studio for Mac can't create a Blazor Web App in its UI at this time. - Install the [.NET 8.0 Preview SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) using the correct macOS installer for your platform architecture (Arm64 or x64). For more information on trusting the ASP.NET Core HTTPS development certificate, see . + Install the [.NET 8.0 Preview SDK](https://dotnet.microsoft.com/download/dotnet/8.0) using the correct macOS installer for your platform architecture (Arm64 or x64). For more information on trusting the ASP.NET Core HTTPS development certificate, see . Open a command shell with Apple's **Terminal** utility application in macOS's `Applications/Utilities` folder. Change the directory to the location where you want to create the app with the [`ls` command](https://man7.org/linux/man-pages/man1/ls.1.html). For example, use the `ls Desktop` command to change the directory to the desktop. Execute the following command in the command shell: @@ -489,7 +493,9 @@ To create a Blazor app on macOS, use the following guidance: dotnet new blazor -o BlazorApp ``` - To enable interactivity using the server render mode, add the `--use-server`option to the command: + + + To enable interactivity with server-side rendering, add the `--use-server`option to the command: ```dotnetcli dotnet new blazor -o BlazorApp --use-server From e4b0443295260fcb46e20c7eee995e8058827f75 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Thu, 13 Jul 2023 09:44:30 -0400 Subject: [PATCH 3/3] Tooling and tutorial Pre6 updates --- aspnetcore/blazor/tooling.md | 6 ++-- .../blazor/tutorials/build-a-blazor-app.md | 4 ++- .../tutorials/signalr-blazor-preview.md | 28 +++++-------------- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/aspnetcore/blazor/tooling.md b/aspnetcore/blazor/tooling.md index 7c77ffb2b450..6a10062b7994 100644 --- a/aspnetcore/blazor/tooling.md +++ b/aspnetcore/blazor/tooling.md @@ -49,7 +49,7 @@ To create a Blazor app on Windows, use the following guidance: -* Provide a **Project name** and confirm that the **Location** is correct. To enable interactivity with server-side rendering, select the **Use interactive server components** checkbox. Select **Next**. +* Provide a **Project name** and confirm that the **Location** is correct. To enable interactivity with server-side rendering (SSR), select the **Use interactive server components** checkbox. Select **Next**. :::moniker-end @@ -112,7 +112,7 @@ Create a new project: - To enable interactivity with server-side rendering, add the `--use-server` option to the command: + To enable interactivity with server-side rendering (SSR), add the `--use-server` option to the command: ```dotnetcli dotnet new blazor -o BlazorApp --use-server @@ -495,7 +495,7 @@ To create a Blazor app on macOS, use the following guidance: - To enable interactivity with server-side rendering, add the `--use-server`option to the command: + To enable interactivity with server-side rendering (SSR), add the `--use-server`option to the command: ```dotnetcli dotnet new blazor -o BlazorApp --use-server diff --git a/aspnetcore/blazor/tutorials/build-a-blazor-app.md b/aspnetcore/blazor/tutorials/build-a-blazor-app.md index 55ad392ea02a..52099dbcb4ca 100644 --- a/aspnetcore/blazor/tutorials/build-a-blazor-app.md +++ b/aspnetcore/blazor/tutorials/build-a-blazor-app.md @@ -52,9 +52,11 @@ At the end of this tutorial, you'll have a working todo list app. Create a new Blazor app named `TodoList` in a command shell: ```dotnetcli -dotnet new blazor -o TodoList +dotnet new blazor -o TodoList --use-server ``` +The `-o|--output` option creates a folder for the project. If you've created a folder for the project and the command shell is open in that folder, omit the `-o|--output` option and value to create the project. The `--use-server` option enables interactivity with server-side rendering (SSR). + :::moniker-end :::moniker range="< aspnetcore-8.0" diff --git a/aspnetcore/blazor/tutorials/signalr-blazor-preview.md b/aspnetcore/blazor/tutorials/signalr-blazor-preview.md index f9c38da0eb3d..da484dec74e9 100644 --- a/aspnetcore/blazor/tutorials/signalr-blazor-preview.md +++ b/aspnetcore/blazor/tutorials/signalr-blazor-preview.md @@ -116,10 +116,10 @@ Confirm the **Framework** is .NET 8.0 or later. Select **Create**. In a command shell, execute the following command: ```dotnetcli -dotnet new blazor -o BlazorSignalRApp +dotnet new blazor -o BlazorSignalRApp --use-server ``` -The `-o|--output` option creates a folder for the project. If you've created a folder for the project and the command shell is open in that folder, omit the `-o|--output` option and value to create the project. +The `-o|--output` option creates a folder for the project. If you've created a folder for the project and the command shell is open in that folder, omit the `-o|--output` option and value to create the project. The `--use-server` option enables interactivity with server-side rendering (SSR). In Visual Studio Code, open the app's project folder. @@ -130,9 +130,11 @@ When the dialog appears to add assets to build and debug the app, select **Yes** Visual Studio for Mac can't create a Blazor Web App in its UI at this time. Open a command shell with Apple's **Terminal** utility application in macOS's `Applications/Utilities` folder. Change the directory to the location where you want to create the app with the [`ls` command](https://man7.org/linux/man-pages/man1/ls.1.html). For example, use the `ls Desktop` command to change the directory to the desktop. Execute the following command in the command shell: ```dotnetcli -dotnet new blazor -o BlazorApp +dotnet new blazor -o BlazorApp --use-server ``` +The `-o|--output` option creates a folder for the project. If you've created a folder for the project and the command shell is open in that folder, omit the `-o|--output` option and value to create the project. The `--use-server` option enables interactivity with server-side rendering (SSR). + After the app is created, open the project file (`BlazorApp.csproj`) with Visual Studio for Mac. > [!NOTE] @@ -161,10 +163,10 @@ Open the project by navigating to the project folder and opening the project's s In a command shell, execute the following command: ```dotnetcli -dotnet new blazor -o BlazorSignalRApp +dotnet new blazor -o BlazorSignalRApp --use-server ``` -The `-o|--output` option creates a folder for the project. If you've created a folder for the project and the command shell is open in that folder, omit the `-o|--output` option and value to create the project. +The `-o|--output` option creates a folder for the project. If you've created a folder for the project and the command shell is open in that folder, omit the `-o|--output` option and value to create the project. The `--use-server` option enables interactivity with server-side rendering (SSR). --- @@ -261,22 +263,6 @@ using Microsoft.AspNetCore.ResponseCompression; using BlazorSignalRApp.Hubs; ``` - - -Locate the line that adds services and configuration for Razor components: - -```csharp -builder.Services.AddRazorComponents(); -``` - -Chain a call to `AddServerComponents` to `AddRazorComponents`. Change the line to the following: - -```csharp -builder.Services.AddRazorComponents().AddServerComponents(); -``` - - - Add Response Compression Middleware services: ```csharp