diff --git a/README.md b/README.md index 8105cf4..9a0a36c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ In this workshop, you'll learn by building out features of the [eShop Reference ### Using Windows and Visual Studio -If you're on Windows and using Visual Studio, you must use [Visual Studio 2022 Preview](https://visualstudio.com/preview) (version 17.10.0 Preview 5.0 or later). The preview version of Visual Studio 2022 is safe to install side-by-side with the release version. We recommend using Visual Studio 2022 Preview if you're on Windows as it includes support for working with .NET Aspire projects. +If you're on Windows and using Visual Studio, you must use [Visual Studio 2022 Preview](https://visualstudio.com/preview) (version 17.12.0 or later). The preview version of Visual Studio 2022 is safe to install side-by-side with the release version. > Note: When installing Visual Studio you only need to install the `ASP.NET and web development` workload. @@ -20,11 +20,11 @@ If you're in an instructor-led workshop session and have issues downloading the ### Using macOS, Linux, or Windows but not using Visual Studio -If you're using macOs or Linux, or on Windows but don't want to use Visual Studio, you must [download](https://www.microsoft.com/net/download) and install the .NET SDK (version 8.0.100 or newer). You can use the editor or IDE of your choice but note that some operations might be more difficult due to lack of support for .NET Aspire at this time. +If you're using macOs or Linux, or on Windows but don't want to use Visual Studio, you must [download](https://www.microsoft.com/net/download) and install the .NET SDK (version 8.0.100 or newer). .NET Aspire 9.0 runs on both .NET 8.0 and .NET 9.0. You can use the editor or IDE of your choice but note that some operations might be more difficult due to lack of support for .NET Aspire at this time. ### Updating and installing the .NET SDK workload for Aspire -After installing Visual Studio Preview or the required .NET SDK, you will need to update and install the .NET SDK workload for Aspire. This workshop is using the latest version of .NET Aspire (8.2). For your convenience, scripts are provided in this repository to make this process easy: +After installing Visual Studio Preview or the required .NET SDK, you will need to update and install the .NET SDK workload for Aspire. This workshop is using the latest version of .NET Aspire (9.0). For your convenience, scripts are provided in this repository to make this process easy: 1. Clone [this repo](https://github.com/dotnet-presentations/eshop-app-workshop) to your machine. 1. In your terminal, navigate to the repo root and run the command `dotnet --version` to verify you are using version 8.0.100 or later of the .NET SDK: diff --git a/build.cmd b/build.cmd index 6cc6a9c..c841ca8 100644 --- a/build.cmd +++ b/build.cmd @@ -1,5 +1,3 @@ @ECHO OFF -dotnet workload install aspire - dotnet build .\build\Build.proj \ No newline at end of file diff --git a/build.sh b/build.sh index cd58c0d..4cea617 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,3 @@ #!/usr/bin/env bash -dotnet workload install aspire - dotnet build ./build/Build.proj \ No newline at end of file diff --git a/build/Build.proj b/build/Build.proj index e03e788..4c2fbb4 100644 --- a/build/Build.proj +++ b/build/Build.proj @@ -1,6 +1,6 @@ - net8.0 + net9.0 False diff --git a/global.json b/global.json index 1c1557c..8d89144 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "9.0.100", "rollForward": "feature", "allowPrerelease": true } diff --git a/labs/1-Create-Catalog-API/README.md b/labs/1-Create-Catalog-API/README.md index 488ccbf..a966196 100644 --- a/labs/1-Create-Catalog-API/README.md +++ b/labs/1-Create-Catalog-API/README.md @@ -21,13 +21,13 @@ We're going to run 2 docker container:, the PostgreSQL container, and [pgAdmin]( postgres -``` +```bash docker run --name postgres-dev -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 -d postgres ``` pgAdmin -``` +```bash docker run --name pgadmin-dev -e PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False -e PGADMIN_CONFIG_SERVER_MODE=False -e PGADMIN_DEFAULT_EMAIL=admin@domain.com -e PGADMIN_DEFAULT_PASSWORD=admin -p 0:80 -d dpage/pgadmin4 ``` @@ -65,15 +65,16 @@ docker run --name pgadmin-dev -e PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False - 1. Stop the application and try launching it again and seeing the output of the `/health` endpoint return `Degraded` while the database initialization is still in progress. 1. Find the port assigned to the pgAdmin container. -**Docker CLI** +### Docker CLI -``` + +```bash docker ps ``` ![Image of the docker CLI showing the port for pgAdmin](./img/find-docker-endpoint.png) -**Docker Desktop** +###Docker Desktop ![Image of docker desktop UI showing the port for pgAdmin](./img/find-docker-endpoint-ui.png) @@ -108,7 +109,7 @@ Containers are extremely useful for hosting service dependencies, but rather tha 1. Run the following commands in the `src` folder to create the `eShop.AppHost` and `eShop.ServiceDefaults` projects. - ``` + ```bash dotnet new aspire-apphost -n eShop.AppHost dotnet new aspire-servicedefaults -n eShop.ServiceDefaults dotnet sln add eShop.AppHost @@ -117,7 +118,7 @@ Containers are extremely useful for hosting service dependencies, but rather tha 1. Now add a reference to the `eShop.AppHost`: - ``` + ```bash cd eShop.AppHost dotnet add reference ..\Catalog.Data.Manager ``` @@ -141,7 +142,7 @@ Containers are extremely useful for hosting service dependencies, but rather tha ``` ```xml - + ``` 1. Use the methods on the `builder` variable to create a PostgreSQL instance called `postgres` with pgAdmin enabled, and a database called `CatalogDB`. Ensure that the `catalog-db-mgr` project resource is configured with a reference to the `catalogDb`: @@ -345,6 +346,7 @@ Now that we've setup the solution to use Aspire for composing our distributed ap ### ``` + 1. Click the **Send request** link displayed above it to send the request and have the response displayed: ![Catalog.API.http file open in Visual Studio](./img/vs-catalog.api-http-file.png) diff --git a/labs/1-Create-Catalog-API/end/Catalog.API/Catalog.API.csproj b/labs/1-Create-Catalog-API/end/Catalog.API/Catalog.API.csproj index 08d1c9f..e5930f3 100644 --- a/labs/1-Create-Catalog-API/end/Catalog.API/Catalog.API.csproj +++ b/labs/1-Create-Catalog-API/end/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true diff --git a/labs/1-Create-Catalog-API/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/1-Create-Catalog-API/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj index a8e2362..52159c3 100644 --- a/labs/1-Create-Catalog-API/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/1-Create-Catalog-API/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -14,8 +14,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/1-Create-Catalog-API/end/Catalog.Data/Catalog.Data.csproj b/labs/1-Create-Catalog-API/end/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/1-Create-Catalog-API/end/Catalog.Data/Catalog.Data.csproj +++ b/labs/1-Create-Catalog-API/end/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/1-Create-Catalog-API/end/eShop.AppHost/eShop.AppHost.csproj b/labs/1-Create-Catalog-API/end/eShop.AppHost/eShop.AppHost.csproj index 56e4f2a..5aaa7b8 100644 --- a/labs/1-Create-Catalog-API/end/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/1-Create-Catalog-API/end/eShop.AppHost/eShop.AppHost.csproj @@ -1,16 +1,17 @@ + Exe - net8.0 + net9.0 enable enable true - - + + diff --git a/labs/1-Create-Catalog-API/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/1-Create-Catalog-API/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index 4488235..2ad3564 100644 --- a/labs/1-Create-Catalog-API/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/1-Create-Catalog-API/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true diff --git a/labs/1-Create-Catalog-API/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/1-Create-Catalog-API/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj index a3a1bdc..a458252 100644 --- a/labs/1-Create-Catalog-API/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/1-Create-Catalog-API/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/1-Create-Catalog-API/src/Catalog.Data/Catalog.Data.csproj b/labs/1-Create-Catalog-API/src/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/1-Create-Catalog-API/src/Catalog.Data/Catalog.Data.csproj +++ b/labs/1-Create-Catalog-API/src/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/2-Create-Blazor-Frontend/README.md b/labs/2-Create-Blazor-Frontend/README.md index dd7ed79..61aab85 100644 --- a/labs/2-Create-Blazor-Frontend/README.md +++ b/labs/2-Create-Blazor-Frontend/README.md @@ -166,7 +166,7 @@ Now that we have a service we can use to easily retrieve the catalog items from 1. [YARP](https://microsoft.github.io/reverse-proxy/) is a package for ASP.NET Core applications that provides highly customizable reverse proxying capabilities. We'll use YARP to proxy the product image requests to the frontend site on to the Catalog API. Add a reference to the `Microsoft.Extensions.ServiceDiscovery.Yarp` package, version `8.0.1`. You can use the [`dotnet` CLI](https://learn.microsoft.com/dotnet/core/tools/dotnet-add-package), or Visual Studio NuGet Package Manager, or edit the `WebApp.csproj` directly: ```xml - + ``` 1. To setup the proxying behavior, first add a line to the `AddApplicationServices` method in the `HostingExtensions.cs` file, to add the require services to the application's DI container: @@ -191,7 +191,7 @@ Now that we have a service we can use to easily retrieve the catalog items from ## Improve the user experience while the catalog page is loading -You may have noticed that, when visiting the catalog page, there is a delay before the page is rendered in the browser. This delay is more noticeable when first loading the page after launching the AppHost project, as it takes a bit of time before the various resources involved are fully started. Let's improve this by utilizing the [streaming rendering feature in Blazor](https://learn.microsoft.com/aspnet/core/blazor/components/rendering?view=aspnetcore-8.0#streaming-rendering) to display a loading message while waiting for the catalog items to be returned by the backend service. +You may have noticed that, when visiting the catalog page, there is a delay before the page is rendered in the browser. This delay is more noticeable when first loading the page after launching the AppHost project, as it takes a bit of time before the various resources involved are fully started. Let's improve this by utilizing the [streaming rendering feature in Blazor](https://learn.microsoft.com/aspnet/core/blazor/components/rendering?view=aspnetcore-9\.0#streaming-rendering) to display a loading message while waiting for the catalog items to be returned by the backend service. 1. In the `Catalog.razor` file, update the markup to render a simple "Loading..." message if the `catalogResult` field is `null`, instead of rendering nothing: diff --git a/labs/2-Create-Blazor-Frontend/end/Catalog.API/Catalog.API.csproj b/labs/2-Create-Blazor-Frontend/end/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/2-Create-Blazor-Frontend/end/Catalog.API/Catalog.API.csproj +++ b/labs/2-Create-Blazor-Frontend/end/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/2-Create-Blazor-Frontend/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/2-Create-Blazor-Frontend/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/2-Create-Blazor-Frontend/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/2-Create-Blazor-Frontend/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/2-Create-Blazor-Frontend/end/Catalog.Data/Catalog.Data.csproj b/labs/2-Create-Blazor-Frontend/end/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/2-Create-Blazor-Frontend/end/Catalog.Data/Catalog.Data.csproj +++ b/labs/2-Create-Blazor-Frontend/end/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/2-Create-Blazor-Frontend/end/WebApp/WebApp.csproj b/labs/2-Create-Blazor-Frontend/end/WebApp/WebApp.csproj index b93e714..af6090e 100644 --- a/labs/2-Create-Blazor-Frontend/end/WebApp/WebApp.csproj +++ b/labs/2-Create-Blazor-Frontend/end/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,7 +11,7 @@ - + diff --git a/labs/2-Create-Blazor-Frontend/end/eShop.AppHost/eShop.AppHost.csproj b/labs/2-Create-Blazor-Frontend/end/eShop.AppHost/eShop.AppHost.csproj index 5a3e7bd..62f75ed 100644 --- a/labs/2-Create-Blazor-Frontend/end/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/2-Create-Blazor-Frontend/end/eShop.AppHost/eShop.AppHost.csproj @@ -1,16 +1,16 @@  - + Exe - net8.0 + net9.0 enable true false - - + + diff --git a/labs/2-Create-Blazor-Frontend/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/2-Create-Blazor-Frontend/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index 6df17b4..8c796c3 100644 --- a/labs/2-Create-Blazor-Frontend/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/2-Create-Blazor-Frontend/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true diff --git a/labs/2-Create-Blazor-Frontend/src/Catalog.API/Catalog.API.csproj b/labs/2-Create-Blazor-Frontend/src/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/2-Create-Blazor-Frontend/src/Catalog.API/Catalog.API.csproj +++ b/labs/2-Create-Blazor-Frontend/src/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/2-Create-Blazor-Frontend/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/2-Create-Blazor-Frontend/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/2-Create-Blazor-Frontend/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/2-Create-Blazor-Frontend/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/2-Create-Blazor-Frontend/src/Catalog.Data/Catalog.Data.csproj b/labs/2-Create-Blazor-Frontend/src/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/2-Create-Blazor-Frontend/src/Catalog.Data/Catalog.Data.csproj +++ b/labs/2-Create-Blazor-Frontend/src/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/2-Create-Blazor-Frontend/src/WebApp/WebApp.csproj b/labs/2-Create-Blazor-Frontend/src/WebApp/WebApp.csproj index 1780f5b..a427997 100644 --- a/labs/2-Create-Blazor-Frontend/src/WebApp/WebApp.csproj +++ b/labs/2-Create-Blazor-Frontend/src/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp diff --git a/labs/2-Create-Blazor-Frontend/src/eShop.AppHost/eShop.AppHost.csproj b/labs/2-Create-Blazor-Frontend/src/eShop.AppHost/eShop.AppHost.csproj index 66aed8a..5d45de6 100644 --- a/labs/2-Create-Blazor-Frontend/src/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/2-Create-Blazor-Frontend/src/eShop.AppHost/eShop.AppHost.csproj @@ -1,16 +1,16 @@  - + Exe - net8.0 + net9.0 enable true false - - + + diff --git a/labs/2-Create-Blazor-Frontend/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/2-Create-Blazor-Frontend/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index 6df17b4..8c796c3 100644 --- a/labs/2-Create-Blazor-Frontend/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/2-Create-Blazor-Frontend/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true diff --git a/labs/3-Add-Identity/README.md b/labs/3-Add-Identity/README.md index b87245b..f97c93f 100644 --- a/labs/3-Add-Identity/README.md +++ b/labs/3-Add-Identity/README.md @@ -12,7 +12,7 @@ There are many options available for implementing an IdP, including: [Keycloak](https://www.keycloak.org/) is available as a configurable container image that makes it very easy to get started with and is supported by a rich community ecosystem. We'll use it to create an IdP for our distributed application. -You can read more about [selecting an identity management solution for ASP.NET Core applications here](https://learn.microsoft.com/aspnet/core/security/how-to-choose-identity-solution?view=aspnetcore-8.0). +You can read more about [selecting an identity management solution for ASP.NET Core applications here](https://learn.microsoft.com/aspnet/core/security/how-to-choose-identity-solution?view=aspnetcore-9\.0). ## Compose a Keycloak instance into the AppHost project via a custom resource type @@ -109,7 +109,7 @@ Now that our Keycloak instance is setup as an IdP, we can configure the web site 1. Open the `WebApp` project and add a reference to the `Microsoft.AspNetCore.Authentication.OpenIdConnect` NuGet package, version `8.0.1`. You can use the `dotnet` CLI, Visual Studio NuGet Package Manager, or just edit the .csproj file manually: ```xml - + ``` 1. In the `WebApp` project, open the `HostingExtensions.cs` file and add a new field to define a name for the `HttpClient` instance the OIDC code will use: diff --git a/labs/3-Add-Identity/end/Catalog.API/Catalog.API.csproj b/labs/3-Add-Identity/end/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/3-Add-Identity/end/Catalog.API/Catalog.API.csproj +++ b/labs/3-Add-Identity/end/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/3-Add-Identity/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/3-Add-Identity/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/3-Add-Identity/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/3-Add-Identity/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/3-Add-Identity/end/Catalog.Data/Catalog.Data.csproj b/labs/3-Add-Identity/end/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/3-Add-Identity/end/Catalog.Data/Catalog.Data.csproj +++ b/labs/3-Add-Identity/end/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/3-Add-Identity/end/WebApp/WebApp.csproj b/labs/3-Add-Identity/end/WebApp/WebApp.csproj index a45ac23..ce281a7 100644 --- a/labs/3-Add-Identity/end/WebApp/WebApp.csproj +++ b/labs/3-Add-Identity/end/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,8 +11,8 @@ - - + + diff --git a/labs/3-Add-Identity/end/eShop.AppHost/eShop.AppHost.csproj b/labs/3-Add-Identity/end/eShop.AppHost/eShop.AppHost.csproj index 5a3e7bd..62f75ed 100644 --- a/labs/3-Add-Identity/end/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/3-Add-Identity/end/eShop.AppHost/eShop.AppHost.csproj @@ -1,16 +1,16 @@  - + Exe - net8.0 + net9.0 enable true false - - + + diff --git a/labs/3-Add-Identity/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/3-Add-Identity/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..8d6ba57 100644 --- a/labs/3-Add-Identity/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/3-Add-Identity/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/labs/3-Add-Identity/src/Catalog.API/Catalog.API.csproj b/labs/3-Add-Identity/src/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/3-Add-Identity/src/Catalog.API/Catalog.API.csproj +++ b/labs/3-Add-Identity/src/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/3-Add-Identity/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/3-Add-Identity/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/3-Add-Identity/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/3-Add-Identity/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/3-Add-Identity/src/Catalog.Data/Catalog.Data.csproj b/labs/3-Add-Identity/src/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/3-Add-Identity/src/Catalog.Data/Catalog.Data.csproj +++ b/labs/3-Add-Identity/src/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/3-Add-Identity/src/WebApp/WebApp.csproj b/labs/3-Add-Identity/src/WebApp/WebApp.csproj index 273bbcd..4792e79 100644 --- a/labs/3-Add-Identity/src/WebApp/WebApp.csproj +++ b/labs/3-Add-Identity/src/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,7 +11,7 @@ - + diff --git a/labs/3-Add-Identity/src/eShop.AppHost/eShop.AppHost.csproj b/labs/3-Add-Identity/src/eShop.AppHost/eShop.AppHost.csproj index 5a3e7bd..62f75ed 100644 --- a/labs/3-Add-Identity/src/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/3-Add-Identity/src/eShop.AppHost/eShop.AppHost.csproj @@ -1,16 +1,16 @@  - + Exe - net8.0 + net9.0 enable true false - - + + diff --git a/labs/3-Add-Identity/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/3-Add-Identity/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..8d6ba57 100644 --- a/labs/3-Add-Identity/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/3-Add-Identity/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/labs/4-Add-Shopping-Basket/README.md b/labs/4-Add-Shopping-Basket/README.md index 873e9b4..583ee26 100644 --- a/labs/4-Add-Shopping-Basket/README.md +++ b/labs/4-Add-Shopping-Basket/README.md @@ -78,7 +78,7 @@ In the .NET CLI, we need to do a few steps manually to configure .NET Aspire orc ``` ```xml - + ``` 1. Open the `Program.cs` file in the `eShop.AppHost` project and add a line to create a new Redis resource named `"BasketStore"` and configure it to host a [Redis Commander](https://joeferner.github.io/redis-commander/) instance too (this will make it easier to inspect the Redis database during development). Capture the resource in a `basketStore` variable: @@ -143,7 +143,7 @@ In the .NET CLI, we need to do a few steps manually to configure .NET Aspire orc Add the `Aspire.StackExchange.Redis` component NuGet package to the `Basket.API` project. You can use the **Add > .NET Aspire Compoenent...** project menu item in Visual Studio, the `dotnet add package` command at the command line, or by editing the `Basket.API.csproj` file directly: ```xml - + ``` 1. In the `AddApplicationServices` method in `HostingExtensions.cs`, add a call to `AddRedis` to configure the Redis client in the application's DI container. Pass the name `"BasketStore"` to the method to indicate that the client should be configured to connect to the Redis resource with that name in the AppHost: @@ -496,7 +496,7 @@ The starting point for this lab already includes updates to the web site to prov 1. Open the `BasketState.cs` file in the `WebApp` project and add take a moment to read through the code. This class is used to manage the current state of the shopping bag during a web request. Blazor components run their logic individually as the component tree is rendered, so the state of the shopping basket needs to be managed in a way that is shared between components during a single request. 1. Open the `CartPage.razor` file and take a moment to read through the code. This component displays the items in the shopping basket and allows the user to update the quantity of items in the basket. The component uses the `BasketState` class to manage the state of the shopping basket during the request. - Pay special note to the logic in the `CurrentOrPendingQuantity` method that ensures the quantity rendered in the UI matches what the user has requested if they have requested a change, or the current quantity if they have not. This is required due to the way Blazor components are rendered and re-rendered during a request when using [Streaming Rendering](https://learn.microsoft.com/aspnet/core/blazor/components/rendering?view=aspnetcore-8.0#streaming-rendering). + Pay special note to the logic in the `CurrentOrPendingQuantity` method that ensures the quantity rendered in the UI matches what the user has requested if they have requested a change, or the current quantity if they have not. This is required due to the way Blazor components are rendered and re-rendered during a request when using [Streaming Rendering](https://learn.microsoft.com/aspnet/core/blazor/components/rendering?view=aspnetcore-9\.0#streaming-rendering). 1. Open the `ItemPage.razor` file and take a moment to read through the code. This component has been updated with a form that the user can use to add the item to their cart, or sign in if required. If the item is already in their basket, it displays the quantity. @@ -609,7 +609,7 @@ The starting point for this lab already includes updates to the web site to prov 1. Run the AppHost project and load the web site home page. Ten seconds after the home page is initially displayed, you might see an error displayed with the message: - ``` + ```bash Grpc.Core.RpcException: Status(StatusCode="Unauthenticated", Detail="The caller is not authenticated.") ``` @@ -624,4 +624,3 @@ The starting point for this lab already includes updates to the web site to prov ![eShop web site header showing shopping basket item count](./img/eshop-webapp-header-basket-count.png) ![eShop web site shopping basket page](./img/eshop-webapp-cart-page.png) - diff --git a/labs/4-Add-Shopping-Basket/end/Basket.API/Basket.API.csproj b/labs/4-Add-Shopping-Basket/end/Basket.API/Basket.API.csproj index 03644de..ec3e736 100644 --- a/labs/4-Add-Shopping-Basket/end/Basket.API/Basket.API.csproj +++ b/labs/4-Add-Shopping-Basket/end/Basket.API/Basket.API.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Basket.API enable enable - + diff --git a/labs/4-Add-Shopping-Basket/end/Catalog.API/Catalog.API.csproj b/labs/4-Add-Shopping-Basket/end/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/4-Add-Shopping-Basket/end/Catalog.API/Catalog.API.csproj +++ b/labs/4-Add-Shopping-Basket/end/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/4-Add-Shopping-Basket/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/4-Add-Shopping-Basket/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/4-Add-Shopping-Basket/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/4-Add-Shopping-Basket/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/4-Add-Shopping-Basket/end/Catalog.Data/Catalog.Data.csproj b/labs/4-Add-Shopping-Basket/end/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/4-Add-Shopping-Basket/end/Catalog.Data/Catalog.Data.csproj +++ b/labs/4-Add-Shopping-Basket/end/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/4-Add-Shopping-Basket/end/WebApp/WebApp.csproj b/labs/4-Add-Shopping-Basket/end/WebApp/WebApp.csproj index be14e06..8096daf 100644 --- a/labs/4-Add-Shopping-Basket/end/WebApp/WebApp.csproj +++ b/labs/4-Add-Shopping-Basket/end/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,8 +11,8 @@ - - + + diff --git a/labs/4-Add-Shopping-Basket/end/eShop.AppHost/eShop.AppHost.csproj b/labs/4-Add-Shopping-Basket/end/eShop.AppHost/eShop.AppHost.csproj index 4f8285a..8f9ad46 100644 --- a/labs/4-Add-Shopping-Basket/end/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/4-Add-Shopping-Basket/end/eShop.AppHost/eShop.AppHost.csproj @@ -1,17 +1,17 @@  - + Exe - net8.0 + net9.0 enable true false - - - + + + diff --git a/labs/4-Add-Shopping-Basket/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/4-Add-Shopping-Basket/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..8d6ba57 100644 --- a/labs/4-Add-Shopping-Basket/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/4-Add-Shopping-Basket/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/labs/4-Add-Shopping-Basket/src/Catalog.API/Catalog.API.csproj b/labs/4-Add-Shopping-Basket/src/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/4-Add-Shopping-Basket/src/Catalog.API/Catalog.API.csproj +++ b/labs/4-Add-Shopping-Basket/src/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/4-Add-Shopping-Basket/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/4-Add-Shopping-Basket/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/4-Add-Shopping-Basket/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/4-Add-Shopping-Basket/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/4-Add-Shopping-Basket/src/Catalog.Data/Catalog.Data.csproj b/labs/4-Add-Shopping-Basket/src/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/4-Add-Shopping-Basket/src/Catalog.Data/Catalog.Data.csproj +++ b/labs/4-Add-Shopping-Basket/src/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/4-Add-Shopping-Basket/src/WebApp/WebApp.csproj b/labs/4-Add-Shopping-Basket/src/WebApp/WebApp.csproj index a45ac23..ce281a7 100644 --- a/labs/4-Add-Shopping-Basket/src/WebApp/WebApp.csproj +++ b/labs/4-Add-Shopping-Basket/src/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,8 +11,8 @@ - - + + diff --git a/labs/4-Add-Shopping-Basket/src/eShop.AppHost/eShop.AppHost.csproj b/labs/4-Add-Shopping-Basket/src/eShop.AppHost/eShop.AppHost.csproj index 5a3e7bd..62f75ed 100644 --- a/labs/4-Add-Shopping-Basket/src/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/4-Add-Shopping-Basket/src/eShop.AppHost/eShop.AppHost.csproj @@ -1,16 +1,16 @@  - + Exe - net8.0 + net9.0 enable true false - - + + diff --git a/labs/4-Add-Shopping-Basket/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/4-Add-Shopping-Basket/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..8d6ba57 100644 --- a/labs/4-Add-Shopping-Basket/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/4-Add-Shopping-Basket/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/labs/5-Add-Checkout/README.md b/labs/5-Add-Checkout/README.md index 25167db..91a0490 100644 --- a/labs/5-Add-Checkout/README.md +++ b/labs/5-Add-Checkout/README.md @@ -263,6 +263,7 @@ Now that we've verified the Ordering database is working, let's add an HTTP API public required IReadOnlyCollection Items { get; set; } } ``` + 1. Back in the `OrdersApi.cs` file, in the `MapOrdersApi` method, add a call to `app.MapGet` to define an endpoint that responds to POST requests to the `/` path, and is handled by an async lambda that accepts three parameters: a `CreateOrderRequest` that will be deserialized from JSON in the POST request body, a `ClaimsPrincipal` type that will be auto-populated with the current user, and the `OrderingDbContext` instance that will come from the DI container: ```csharp diff --git a/labs/5-Add-Checkout/end/Basket.API/Basket.API.csproj b/labs/5-Add-Checkout/end/Basket.API/Basket.API.csproj index 36d69da..5f5a58c 100644 --- a/labs/5-Add-Checkout/end/Basket.API/Basket.API.csproj +++ b/labs/5-Add-Checkout/end/Basket.API/Basket.API.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Basket.API enable enable - + diff --git a/labs/5-Add-Checkout/end/Catalog.API/Catalog.API.csproj b/labs/5-Add-Checkout/end/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/5-Add-Checkout/end/Catalog.API/Catalog.API.csproj +++ b/labs/5-Add-Checkout/end/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/5-Add-Checkout/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/5-Add-Checkout/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/5-Add-Checkout/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/5-Add-Checkout/end/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/5-Add-Checkout/end/Catalog.Data/Catalog.Data.csproj b/labs/5-Add-Checkout/end/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/5-Add-Checkout/end/Catalog.Data/Catalog.Data.csproj +++ b/labs/5-Add-Checkout/end/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/5-Add-Checkout/end/Ordering.API/Ordering.API.csproj b/labs/5-Add-Checkout/end/Ordering.API/Ordering.API.csproj index 45630fc..3d3e799 100644 --- a/labs/5-Add-Checkout/end/Ordering.API/Ordering.API.csproj +++ b/labs/5-Add-Checkout/end/Ordering.API/Ordering.API.csproj @@ -1,15 +1,15 @@ - + - net8.0 + net9.0 enable enable true - - + + diff --git a/labs/5-Add-Checkout/end/Ordering.Data.Manager/Ordering.Data.Manager.csproj b/labs/5-Add-Checkout/end/Ordering.Data.Manager/Ordering.Data.Manager.csproj index cc947d2..565890e 100644 --- a/labs/5-Add-Checkout/end/Ordering.Data.Manager/Ordering.Data.Manager.csproj +++ b/labs/5-Add-Checkout/end/Ordering.Data.Manager/Ordering.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Ordering.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/5-Add-Checkout/end/Ordering.Data/Ordering.Data.csproj b/labs/5-Add-Checkout/end/Ordering.Data/Ordering.Data.csproj index aba0522..c235893 100644 --- a/labs/5-Add-Checkout/end/Ordering.Data/Ordering.Data.csproj +++ b/labs/5-Add-Checkout/end/Ordering.Data/Ordering.Data.csproj @@ -1,13 +1,13 @@  - net8.0 + net9.0 eShop.Ordering.Data enable enable - + diff --git a/labs/5-Add-Checkout/end/WebApp/WebApp.csproj b/labs/5-Add-Checkout/end/WebApp/WebApp.csproj index a229bf5..6cd3ca2 100644 --- a/labs/5-Add-Checkout/end/WebApp/WebApp.csproj +++ b/labs/5-Add-Checkout/end/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,8 +11,8 @@ - - + + diff --git a/labs/5-Add-Checkout/end/eShop.AppHost/eShop.AppHost.csproj b/labs/5-Add-Checkout/end/eShop.AppHost/eShop.AppHost.csproj index 409de59..bd7e0e9 100644 --- a/labs/5-Add-Checkout/end/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/5-Add-Checkout/end/eShop.AppHost/eShop.AppHost.csproj @@ -1,17 +1,17 @@  - + Exe - net8.0 + net9.0 enable true false - - - + + + diff --git a/labs/5-Add-Checkout/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/5-Add-Checkout/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..8d6ba57 100644 --- a/labs/5-Add-Checkout/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/5-Add-Checkout/end/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/labs/5-Add-Checkout/src/Basket.API/Basket.API.csproj b/labs/5-Add-Checkout/src/Basket.API/Basket.API.csproj index 36d69da..5f5a58c 100644 --- a/labs/5-Add-Checkout/src/Basket.API/Basket.API.csproj +++ b/labs/5-Add-Checkout/src/Basket.API/Basket.API.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Basket.API enable enable - + diff --git a/labs/5-Add-Checkout/src/Catalog.API/Catalog.API.csproj b/labs/5-Add-Checkout/src/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/5-Add-Checkout/src/Catalog.API/Catalog.API.csproj +++ b/labs/5-Add-Checkout/src/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/5-Add-Checkout/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/5-Add-Checkout/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/5-Add-Checkout/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/5-Add-Checkout/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/5-Add-Checkout/src/Catalog.Data/Catalog.Data.csproj b/labs/5-Add-Checkout/src/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/5-Add-Checkout/src/Catalog.Data/Catalog.Data.csproj +++ b/labs/5-Add-Checkout/src/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/5-Add-Checkout/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj b/labs/5-Add-Checkout/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj index cc947d2..565890e 100644 --- a/labs/5-Add-Checkout/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj +++ b/labs/5-Add-Checkout/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Ordering.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/5-Add-Checkout/src/Ordering.Data/Ordering.Data.csproj b/labs/5-Add-Checkout/src/Ordering.Data/Ordering.Data.csproj index aba0522..c235893 100644 --- a/labs/5-Add-Checkout/src/Ordering.Data/Ordering.Data.csproj +++ b/labs/5-Add-Checkout/src/Ordering.Data/Ordering.Data.csproj @@ -1,13 +1,13 @@  - net8.0 + net9.0 eShop.Ordering.Data enable enable - + diff --git a/labs/5-Add-Checkout/src/WebApp/WebApp.csproj b/labs/5-Add-Checkout/src/WebApp/WebApp.csproj index a229bf5..6cd3ca2 100644 --- a/labs/5-Add-Checkout/src/WebApp/WebApp.csproj +++ b/labs/5-Add-Checkout/src/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,8 +11,8 @@ - - + + diff --git a/labs/5-Add-Checkout/src/eShop.AppHost/eShop.AppHost.csproj b/labs/5-Add-Checkout/src/eShop.AppHost/eShop.AppHost.csproj index 152fb0f..77a06fc 100644 --- a/labs/5-Add-Checkout/src/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/5-Add-Checkout/src/eShop.AppHost/eShop.AppHost.csproj @@ -1,17 +1,17 @@  - + Exe - net8.0 + net9.0 enable true false - - - + + + diff --git a/labs/5-Add-Checkout/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/5-Add-Checkout/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..8d6ba57 100644 --- a/labs/5-Add-Checkout/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/5-Add-Checkout/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/labs/6-Add-Resiliency/src/Basket.API/Basket.API.csproj b/labs/6-Add-Resiliency/src/Basket.API/Basket.API.csproj index 2b4595b..7f05a7e 100644 --- a/labs/6-Add-Resiliency/src/Basket.API/Basket.API.csproj +++ b/labs/6-Add-Resiliency/src/Basket.API/Basket.API.csproj @@ -1,12 +1,12 @@  - net8.0 + net9.0 enable - + diff --git a/labs/6-Add-Resiliency/src/Catalog.API/Catalog.API.csproj b/labs/6-Add-Resiliency/src/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/labs/6-Add-Resiliency/src/Catalog.API/Catalog.API.csproj +++ b/labs/6-Add-Resiliency/src/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/labs/6-Add-Resiliency/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/labs/6-Add-Resiliency/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..0257799 100644 --- a/labs/6-Add-Resiliency/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/labs/6-Add-Resiliency/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/6-Add-Resiliency/src/Catalog.Data/Catalog.Data.csproj b/labs/6-Add-Resiliency/src/Catalog.Data/Catalog.Data.csproj index 7074a8e..35ee8b8 100644 --- a/labs/6-Add-Resiliency/src/Catalog.Data/Catalog.Data.csproj +++ b/labs/6-Add-Resiliency/src/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 eShop.Catalog.Data enable enable - + diff --git a/labs/6-Add-Resiliency/src/Ordering.API/Ordering.API.csproj b/labs/6-Add-Resiliency/src/Ordering.API/Ordering.API.csproj index a82c9a6..e715aec 100644 --- a/labs/6-Add-Resiliency/src/Ordering.API/Ordering.API.csproj +++ b/labs/6-Add-Resiliency/src/Ordering.API/Ordering.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Ordering.API 7161b768-033d-41c7-bc5d-37528275e1f3 enable @@ -15,7 +15,7 @@ - + \ No newline at end of file diff --git a/labs/6-Add-Resiliency/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj b/labs/6-Add-Resiliency/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj index cc947d2..565890e 100644 --- a/labs/6-Add-Resiliency/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj +++ b/labs/6-Add-Resiliency/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Ordering.Data.Manager enable enable @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/labs/6-Add-Resiliency/src/Ordering.Data/Ordering.Data.csproj b/labs/6-Add-Resiliency/src/Ordering.Data/Ordering.Data.csproj index 35198c3..6f8d11d 100644 --- a/labs/6-Add-Resiliency/src/Ordering.Data/Ordering.Data.csproj +++ b/labs/6-Add-Resiliency/src/Ordering.Data/Ordering.Data.csproj @@ -1,13 +1,13 @@  - net8.0 + net9.0 eShop.Ordering.Data enable enable - + diff --git a/labs/6-Add-Resiliency/src/WebApp/WebApp.csproj b/labs/6-Add-Resiliency/src/WebApp/WebApp.csproj index a229bf5..6cd3ca2 100644 --- a/labs/6-Add-Resiliency/src/WebApp/WebApp.csproj +++ b/labs/6-Add-Resiliency/src/WebApp/WebApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable eShop.WebApp @@ -11,8 +11,8 @@ - - + + diff --git a/labs/6-Add-Resiliency/src/eShop.AppHost/eShop.AppHost.csproj b/labs/6-Add-Resiliency/src/eShop.AppHost/eShop.AppHost.csproj index 409de59..bd7e0e9 100644 --- a/labs/6-Add-Resiliency/src/eShop.AppHost/eShop.AppHost.csproj +++ b/labs/6-Add-Resiliency/src/eShop.AppHost/eShop.AppHost.csproj @@ -1,17 +1,17 @@  - + Exe - net8.0 + net9.0 enable true false - - - + + + diff --git a/labs/6-Add-Resiliency/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/labs/6-Add-Resiliency/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..8d6ba57 100644 --- a/labs/6-Add-Resiliency/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/labs/6-Add-Resiliency/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -2,7 +2,7 @@ Library - net8.0 + net9.0 enable enable true @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/src/Basket.API/Basket.API.csproj b/src/Basket.API/Basket.API.csproj index 2664376..7427510 100644 --- a/src/Basket.API/Basket.API.csproj +++ b/src/Basket.API/Basket.API.csproj @@ -1,22 +1,18 @@  - net8.0 + net9.0 2964ec8e-0d48-4541-b305-94cab537f867 enable true - - + - - - - + \ No newline at end of file diff --git a/src/Basket.API/Properties/launchSettings.json b/src/Basket.API/Properties/launchSettings.json index dba6448..28b22ad 100644 --- a/src/Basket.API/Properties/launchSettings.json +++ b/src/Basket.API/Properties/launchSettings.json @@ -7,7 +7,8 @@ "applicationUrl": "http://localhost:5221", "environmentVariables": { "Identity__Url": "http://localhost:5223", - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22285" } }, "https": { @@ -16,8 +17,11 @@ "applicationUrl": "https://localhost:7278;http://localhost:5221", "environmentVariables": { "Identity__Url": "http://localhost:5223", - "ASPNETCORE_ENVIRONMENT": "Development" - } + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22143" + }, + "dotnetRunMessages": true } } } \ No newline at end of file diff --git a/src/Catalog.API/Catalog.API.csproj b/src/Catalog.API/Catalog.API.csproj index 9b3e732..6143256 100644 --- a/src/Catalog.API/Catalog.API.csproj +++ b/src/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 eShop.Catalog.API d1b521ec-3411-4d39-98c6-8509466ed471 enable diff --git a/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj b/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj index b45cf08..8be6493 100644 --- a/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj +++ b/src/Catalog.Data.Manager/Catalog.Data.Manager.csproj @@ -1,28 +1,23 @@  - - net8.0 + net9.0 eShop.Catalog.Data.Manager enable enable - - - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + \ No newline at end of file diff --git a/src/Catalog.Data.Manager/Properties/launchSettings.json b/src/Catalog.Data.Manager/Properties/launchSettings.json index 5d97802..dc00a8d 100644 --- a/src/Catalog.Data.Manager/Properties/launchSettings.json +++ b/src/Catalog.Data.Manager/Properties/launchSettings.json @@ -1,4 +1,4 @@ -{ +{ "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { "http": { @@ -8,7 +8,8 @@ "launchUrl": "health", "applicationUrl": "http://localhost:5035", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22275" } }, "https": { @@ -18,8 +19,10 @@ "launchUrl": "health", "applicationUrl": "https://localhost:7014;http://localhost:5035", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22296" } } } -} +} \ No newline at end of file diff --git a/src/Catalog.Data/Catalog.Data.csproj b/src/Catalog.Data/Catalog.Data.csproj index 7074a8e..61cb342 100644 --- a/src/Catalog.Data/Catalog.Data.csproj +++ b/src/Catalog.Data/Catalog.Data.csproj @@ -1,14 +1,11 @@  - - net8.0 + net9.0 eShop.Catalog.Data enable enable - - + - - + \ No newline at end of file diff --git a/src/IntegrationTests/Infrastructure/DistributedApplicationExtensions.cs b/src/IntegrationTests/Infrastructure/DistributedApplicationExtensions.cs index 2765d9b..bba3fd1 100644 --- a/src/IntegrationTests/Infrastructure/DistributedApplicationExtensions.cs +++ b/src/IntegrationTests/Infrastructure/DistributedApplicationExtensions.cs @@ -5,6 +5,8 @@ using System.Net; using System.Reflection; using System.Security.Cryptography; +using Aspire.Hosting; +using Aspire.Hosting.ApplicationModel; using IntegrationTests.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -121,7 +123,7 @@ public static HttpClient CreateHttpClient(this DistributedApplication app, strin public static async Task TryApplyEfMigrationsAsync(this DistributedApplication app, ProjectResource project) { var logger = app.Services.GetRequiredService().CreateLogger(nameof(TryApplyEfMigrationsAsync)); - var projectName = project.GetName(); + var projectName = project.Name; // First check if the project has a migration endpoint, if it doesn't it will respond with a 404 logger.LogInformation("Checking if project '{ProjectName}' has a migration endpoint", projectName); diff --git a/src/IntegrationTests/Infrastructure/ResourceExtensions.cs b/src/IntegrationTests/Infrastructure/ResourceExtensions.cs index 98e5bd2..db98a04 100644 --- a/src/IntegrationTests/Infrastructure/ResourceExtensions.cs +++ b/src/IntegrationTests/Infrastructure/ResourceExtensions.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Aspire.Hosting.ApplicationModel; + namespace IntegrationTests.Infrastructure; internal static class ResourceExtensions diff --git a/src/IntegrationTests/IntegrationTests.csproj b/src/IntegrationTests/IntegrationTests.csproj index 1728b47..4ce1235 100644 --- a/src/IntegrationTests/IntegrationTests.csproj +++ b/src/IntegrationTests/IntegrationTests.csproj @@ -1,15 +1,13 @@  - - net8.0 + net9.0 enable enable false true - - + @@ -23,14 +21,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + \ No newline at end of file diff --git a/src/IntegrationTests/WebAppTests.cs b/src/IntegrationTests/WebAppTests.cs index a676f7a..7fc8f1a 100644 --- a/src/IntegrationTests/WebAppTests.cs +++ b/src/IntegrationTests/WebAppTests.cs @@ -1,4 +1,5 @@ using System.Net; +using Aspire.Hosting.ApplicationModel; using IntegrationTests.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/Ordering.API/Ordering.API.csproj b/src/Ordering.API/Ordering.API.csproj index a82c9a6..79ee8f1 100644 --- a/src/Ordering.API/Ordering.API.csproj +++ b/src/Ordering.API/Ordering.API.csproj @@ -1,21 +1,17 @@  - - net8.0 + net9.0 eShop.Ordering.API 7161b768-033d-41c7-bc5d-37528275e1f3 enable enable - - - + - \ No newline at end of file diff --git a/src/Ordering.API/Properties/launchSettings.json b/src/Ordering.API/Properties/launchSettings.json index 80b49aa..6989481 100644 --- a/src/Ordering.API/Properties/launchSettings.json +++ b/src/Ordering.API/Properties/launchSettings.json @@ -6,7 +6,8 @@ "launchBrowser": true, "applicationUrl": "http://localhost:5224", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22169" } }, "https": { @@ -14,8 +15,11 @@ "launchBrowser": true, "applicationUrl": "https://localhost:7360;http://localhost:5224", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22127" + }, + "dotnetRunMessages": true } } } \ No newline at end of file diff --git a/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj b/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj index cc947d2..8f8fe1f 100644 --- a/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj +++ b/src/Ordering.Data.Manager/Ordering.Data.Manager.csproj @@ -1,28 +1,23 @@  - - net8.0 + net9.0 eShop.Ordering.Data.Manager enable enable - - - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + \ No newline at end of file diff --git a/src/Ordering.Data.Manager/Properties/launchSettings.json b/src/Ordering.Data.Manager/Properties/launchSettings.json index beb062b..836c83f 100644 --- a/src/Ordering.Data.Manager/Properties/launchSettings.json +++ b/src/Ordering.Data.Manager/Properties/launchSettings.json @@ -1,4 +1,4 @@ -{ +{ "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { "http": { @@ -8,7 +8,8 @@ "launchUrl": "health", "applicationUrl": "http://localhost:5157", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22299" } }, "https": { @@ -18,8 +19,10 @@ "launchUrl": "health", "applicationUrl": "https://localhost:7013;http://localhost:5157", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22151" } } } -} +} \ No newline at end of file diff --git a/src/Ordering.Data/Ordering.Data.csproj b/src/Ordering.Data/Ordering.Data.csproj index 35198c3..06adfc8 100644 --- a/src/Ordering.Data/Ordering.Data.csproj +++ b/src/Ordering.Data/Ordering.Data.csproj @@ -1,13 +1,11 @@  - - net8.0 + net9.0 eShop.Ordering.Data enable enable - - + - + \ No newline at end of file diff --git a/src/WebApp/Properties/launchSettings.json b/src/WebApp/Properties/launchSettings.json index 9445b12..468cb63 100644 --- a/src/WebApp/Properties/launchSettings.json +++ b/src/WebApp/Properties/launchSettings.json @@ -7,7 +7,8 @@ "launchBrowser": true, "applicationUrl": "http://localhost:5045", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22161" } }, "https": { @@ -16,8 +17,10 @@ "launchBrowser": true, "applicationUrl": "https://localhost:7298;http://localhost:5045", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22210" } } } -} +} \ No newline at end of file diff --git a/src/WebApp/WebApp.csproj b/src/WebApp/WebApp.csproj index 7db4cf4..012c4a7 100644 --- a/src/WebApp/WebApp.csproj +++ b/src/WebApp/WebApp.csproj @@ -1,24 +1,19 @@  - - net8.0 + net9.0 enable eShop.WebApp - - - - + + - - - + \ No newline at end of file diff --git a/src/eShop.AppHost/eShop.AppHost.csproj b/src/eShop.AppHost/eShop.AppHost.csproj index 409de59..34b1cb1 100644 --- a/src/eShop.AppHost/eShop.AppHost.csproj +++ b/src/eShop.AppHost/eShop.AppHost.csproj @@ -1,19 +1,17 @@  - + Exe - net8.0 + net9.0 enable true false - - - - + + + - @@ -22,5 +20,4 @@ - - + \ No newline at end of file diff --git a/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj b/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj index ce2ce22..bc455e4 100644 --- a/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj +++ b/src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj @@ -1,22 +1,19 @@  - Library - net8.0 + net9.0 enable enable true - - - - - - + + + + @@ -25,4 +22,4 @@ - + \ No newline at end of file