Cover VS debugger regression (#34140)

pull/34142/head
Luke Latham 2024-11-15 13:05:07 -05:00 committed by GitHub
parent 25df462d30
commit 7cb9a4d378
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 47 deletions

View File

@ -47,11 +47,6 @@ For Microsoft Azure services, we recommend using *managed identities*. Managed i
If you don't intend to create the demonstration app while reading the article, you can refer to the completed sample app in the [Blazor samples GitHub repository (`dotnet/blazor-samples`)](https://github.com/dotnet/blazor-samples). Select the latest version folder in the repository. The sample folder for this tutorial's project is named `BlazorWebAppMovies`.
<!-- UPDATE 9.0 Revert when the framework is patched. -->
> [!CAUTION]
> A regression prevents the .NET 9.0 framework from working for this tutorial series at this time. When examining the code in the sample app or obtaining the sample app to run locally, use the .NET 8 version of the sample in the sample repository's `8.0` folder at this time.
## Article code examples
The line breaks of code examples shown in the ASP.NET Core documentation often don't match line breaks in scaffolded code generated by tooling for an app. This is due to an article publishing limitation. Lines of code in articles are generally limited to 85 characters in length, and we manually adjust the line length using line breaks to satisfy our publishing guidelines.

View File

@ -63,13 +63,7 @@ In Visual Studio:
* In the **Additional information** dialog, use the following settings:
<!-- UPDATE 9.0 Update after regression is resolved.
Convert this block back over to 9.0 Standard Term Support. -->
> [!CAUTION]
> A regression prevents the .NET 9.0 framework from working for this tutorial series at this time. You can use the 9.0 SDK and the latest version of Visual Studio, but select the **.NET 8.0 (Long Term Support)** framework when creating the app in the following settings.
* **Framework**: Select **.NET 8.0 (Long Term Support)**.
* **Framework**: Select **.NET 9.0 (Standard Term Support)**.
* **Authentication type**: **None**
* **Configure for HTTPS**: Selected
* **Interactive render mode**: **Server**
@ -117,18 +111,6 @@ Create a new project:
* In the **Command Palette**, name the project `BlazorWebAppMovies`, including matching the capitalization. Using this exact project name is important to ensure that the namespaces match for code that you copy from the tutorial into the app that you're building.
:::moniker range=">= aspnetcore-9.0"
<!-- UPDATE 9.0 Update after regression is resolved.
Remove this moniker range block to revert. -->
> [!CAUTION]
> A regression prevents the .NET 9.0 framework from working for this tutorial series at this time. You can use the 9.0 SDK and the latest version of Visual Studio Code, but specify the **.NET 8.0 (Long Term Support)** framework in the next step when you create the app.
* Select **Show all template options**. Select **Framework** followed by **.NET 8.0**.
:::moniker-end
* Select **Create project** to create the app.
:::zone-end
@ -139,26 +121,6 @@ Confirm that you have the latest [.NET SDK](https://dotnet.microsoft.com/downloa
In a command shell:
:::moniker range=">= aspnetcore-9.0"
* Use the `cd` command to change to the directory to where you want to create the project folder (for example, `cd c:/users/Bernie_Kopell/Documents`).
* Use the [`dotnet new` command](/dotnet/core/tools/dotnet-new) with the [`blazor` project template](/dotnet/core/tools/dotnet-new-sdk-templates#blazor) to create a new Blazor Web App project. The [`-o|--output` option](/dotnet/core/tools/dotnet-new#options) passed to the command creates the project in a new folder at the current shell directory location. Name the project `BlazorWebAppMovies`, including matching the capitalization, so the namespaces match for code that you copy from the tutorial to the app.
<!-- UPDATE 9.0 Update after regression is resolved.
Remove the 9.0 moniker block, leaving the <9.0
content in place. -->
> [!CAUTION]
> A regression prevents the .NET 9.0 framework from working for this tutorial series at this time. You can use the 9.0 SDK, but specify the **.NET 8.0 (Long Term Support)** framework by passing `net8.0` to the framework option (`-f|--framework`) of the `dotnet new` command when creating the app.
```dotnetcli
dotnet new blazor -o BlazorWebAppMovies -f net8.0
```
:::moniker-end
:::moniker range="< aspnetcore-9.0"
* Use the `cd` command to change to the directory to where you want to create the project folder (for example, `cd c:/users/Bernie_Kopell/Documents`).
* Use the [`dotnet new` command](/dotnet/core/tools/dotnet-new) with the [`blazor` project template](/dotnet/core/tools/dotnet-new-sdk-templates#blazor) to create a new Blazor Web App project. The [`-o|--output` option](/dotnet/core/tools/dotnet-new#options) passed to the command creates the project in a new folder at the current shell directory location. Name the project `BlazorWebAppMovies`, including matching the capitalization, so the namespaces match for code that you copy from the tutorial to the app.
@ -166,8 +128,6 @@ In a command shell:
dotnet new blazor -o BlazorWebAppMovies
```
:::moniker-end
:::zone-end
## Run the app

View File

@ -409,7 +409,30 @@ Add a movie to the database. In the following example, the classic sci-fi movie
![Adding The Matrix movie to the database with the 'Create' component](~/blazor/tutorials/movie-database-app/part-2/_static/create-new.png)
When you select the **:::no-loc text="Create":::** button, the movie data is posted to the server and saved in the database. When the app returns to the `Index` page, the added entity appears:
When you select the **:::no-loc text="Create":::** button, the movie data is posted to the server and saved in the database.
:::moniker range=">= aspnetcore-9.0"
<!-- UPDATE 9.0 Revert when debugger is updated -->
:::zone pivot="vs"
A temporary Visual Studio debugger regression breaks with a <xref:Microsoft.AspNetCore.Components.NavigationException> on the line that navigates back to the `Index` page:
![The Matrix movie shown in the movies 'Index' page](~/blazor/tutorials/movie-database-app/part-2/_static/movie-added.png)
To resolve this problem until the debugger is updated by a future Visual Studio release:
1. Deselect the checkbox for **Break when this exception type is user-handled**.
2. Select the **Continue** button in the menu bar to continue execution.
The exception won't be thrown when the <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A> method is executed throughout the rest of the tutorial series.
:::zone-end
:::moniker-end
When the app returns to the `Index` page, the added entity appears:
![The Matrix movie shown in the movies 'Index' page](~/blazor/tutorials/movie-database-app/part-2/_static/movie-added.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB