Creating the Demo Blazor WebAssembly project
The Demo
project that we are creating is based on one of the sample projects that are provided by the Blazor WebAssembly App project template
. After we have used the template to create the project, we will examine the files in the sample project and update some of the files to demonstrate how to use Razor components. To elevate the development experience, we will enable Hot Reload.
Finally, we will separate the code block of one of the components into a separate file to demonstrate how to use the code-behind technique to separate the markup from the code.
Creating the Demo project
Visual Studio comes with quite a few project templates. We are going to use the Blazor WebAssembly App project template
to create our first Blazor WebAssembly project. Since this project template can be used to create many different types of Blazor projects, it is important to follow these instructions precisely:
- Open
Microsoft Visual Studio 2022
. - Click the
Create...