Setting up your PC
For the projects in this book, we use Microsoft Visual Studio Community 2022, .NET 7, Microsoft SQL Server 2022 Express Edition, and Microsoft Azure.
All the projects are built using Microsoft Visual Studio Community 2022 (64-bit) – Current Version 17.4.2 with the ASP.NET and Web Development workload. If you need to install Microsoft Visual Studio Community 2022, follow the directions in the Installing Microsoft Visual Studio Community Edition section later in this chapter.
TIP
Although we are using Microsoft Visual Studio Community 2022, any edition of Microsoft Visual Studio 2022 can be used to complete the projects in this book. Microsoft Visual Studio Code can also be used. However, all the screenshots are from Microsoft Visual Studio Community 2022.
Blazor WebAssembly in .NET 7 requires .NET 7.0. To determine the version of .NET that is running on your computer, open Command Prompt and enter the following command:
dotnet –-version
If your computer is not running .NET 7.0 or higher, follow the directions in the Installing .NET 7.0 section later in this chapter.
Chapters 3 and 10 use Microsoft Azure. Chapter 3 uses Microsoft Azure to publish a Blazor WebAssembly application and Chapter 10 uses Microsoft Azure Active Directory to secure a Blazor WebAssembly application.
The final two projects in this book use Microsoft SQL Server 2022 Express Edition as the backend database. If you need to install Microsoft SQL Server Express Edition, follow the directions in the Installing Microsoft SQL Server Express section later in this chapter.
TIP
Although we are using Microsoft SQL Server 2022 Express Edition, any year or edition of SQL Server can be used to complete the projects in this book.
Installing Microsoft Visual Studio Community Edition
Microsoft Visual Studio Community Edition is the free edition of Microsoft Visual Studio. To install Microsoft Visual Studio Community Edition, perform the following steps:
- Download the Visual Studio installer from https://visualstudio.microsoft.com.
Figure 1.4: Download Visual Studio selector
- Once the download is complete, run the installer to complete the installation.
- During the first step in the installation process, the Visual Studio installer will check the system for existing versions of Visual Studio. Once the installer has finished checking for installed versions, it will open the following installation dialog:
Figure 1.5: The Visual Studio installer
- Select the ASP.NET and web development workload and click the Install button to complete the installation.
Installing .NET 7.0
To install .NET 7.0, perform the following steps:
- Download the .NET 7.0 installer from https://dotnet.microsoft.com/download/dotnet/7.0. We are using the Windows x64 SDK Installer.
- Once the download completes, run the installer to complete the installation of .NET 7.0 on your computer.
- Open Command Prompt and enter the following command to verify that your computer is now running .NET 7.0:
dotnet –-version
The following screenshot is from a computer that is running .NET 7.0:
Figure 1.6: .NET version
Installing Microsoft SQL Server Express
Microsoft SQL Server Express is the free edition of Microsoft SQL Server. To install Microsoft SQL Server Express, do the following:
- Download the Microsoft SQL Server installer for SQL Server Express from https://www.microsoft.com/en-us/sql-server/sql-server-downloads.
- After the download completes, run the SQL Server installer.
- Select the Basic installation type:
Figure 1.7: The SQL Server installer
- Click the Accept button to accept the Microsoft SQL Server License Terms.
- Click the Install button to complete the installation.
The following screenshot shows the dialog that appears after SQL Server Express has been successfully installed:
Figure 1.8: SQL Server Express Edition
Create a Microsoft Azure account
Microsoft Azure is Microsoft’s cloud platform and it offers over 200 products and cloud services. You can use it to run and manage applications with the tools and frameworks of your choice.
If you do not already have a Microsoft Azure account, you can create a free account. Each free account comes with a generous $200 credit to get you started and over 55+ free services.
Figure 1.9: Microsoft Azure
To create a free Microsoft Azure account, do the following:
- Navigate to the Microsoft Azure page, https://azure.microsoft.com/.
- Click the Free account button.
- Click the Start free button.
- Complete the agreement and click the Sign up button.
To complete all the projects in this book, you will need a code editor, such as Microsoft Visual Studio Community 2022, .NET 7.0, Microsoft Azure, and Microsoft SQL Server. In this chapter, we showed you how to install Visual Studio 2022 Community Edition, .NET 7.0, and SQL Server 2022 Express Edition. We also showed you how to open a free Microsoft Azure account.