diff --git a/5-blazor/README.md b/5-blazor/README.md index d94c017..b334e6e 100644 --- a/5-blazor/README.md +++ b/5-blazor/README.md @@ -30,21 +30,17 @@ We'll accomllish this by writing a classic four-in-a-row "Connect Four" game tha First, let's scaffold a new project for our game. With .NET 6 installed, we can start building our application at the command-line. -1. Create a new blazor application by running `dotnet new` +1. Create a new blazor application in Visual Studio 2022 by choosing the "File - New... - Project" menu. - ```bash - dotnet new blazorwasm -o ConnectFour - ``` +1. Choose a "Blazor WebAssembly App" from the list of templates and name it "ConnectFour". Click next + +1. Choose the .NET 6 framework, Authentication type should be set to "None" and uncheck the "ASP.NET Core hosted" checkbox. This should create a _ConnectFour_ directory containing our application. -1. Run the app by calling `dotnet run`. This builds the app and hosts it on a random port between 5000 and 5300. HTTPS has a port selected for it in the range of 7000 to 7300. +2. Run the app by pressing **F5** in Visual Studio 2022. This builds the app and hosts it on a random port between 5000 and 5300. HTTPS has a port selected for it in the range of 7000 to 7300. - ```bash - dotnet run - ``` - - Your terminal should report content similar to the following: + Your Output Window should report content similar to the following: ```output Building... @@ -70,19 +66,9 @@ First, let's scaffold a new project for our game. With .NET 6 installed, we can Next, let's create a board component to be used by players in our game. The component is defined using Razor syntax, which is a mix of HTML and C#. -1. Navigate to the `Shared` folder: +1. Right-click on the **Shared** folder in the Solution Explorer of Visual Studio. Choose "Add - Razor Component" from the context menu and name the file `Board.razor`. By placing this file in the **Share** folder, the component can be referenced and used throughout the application and will contain everything needed for the layout and managing interactions with it. - ```bash - cd Shared - ``` - -1. Create the component using a .NET template. This component can be referenced and used throughout the application and contains everything needed for the layout and managing interactions with it. - - ```bash - dotnet new razorcomponent Board - ``` - - The contents of this new component are a simple H3 and a block indicating where C# code should be written: + The initial contents of this new component are a simple H3 and a block indicating where C# code should be written: ```csharp