C#: Create a Web site with Razor
Welcome
The goal of today’s activity is to learn Web and C# skills and incorporate your new-found knowledge to create a web site!
Starting Up
The goal of today’s activity is to learn Web and C# skills and incorporate your new-found knowledge to create a web site! Let’s get your environment set up.
Before you get started with C# application development, your first step is to select a programming environment. For this workshop, we’ve chosen Visual Studio Code, one of the most popular IDEs among C# developers.
Download Visual Studio Code
Open a new browser window, and then navigate to: https://code.visualstudio.com .
In the browser window, select Download button.
- Wait for the installer file to finish downloading.
The name of the installer file will be similar to the following (for a Windows PC): VSCodeUserSetup-x64-1.81.0.exe.
- Close your browser window.
Install Visual Studio Code
On your PC, open a file explorer application, and then navigate to your computer’s downloads folder.
In your file explorer application, select and run the Visual Studio Code installer file.
On a Windows PC, you can double-click the installer file to begin the install process. For example, double-click VSCodeUserSetup-x64-1.81.0
After a moment, the Setup - Microsoft Visual Studio Code dialog window will appear.
Select I accept the license agreement, and then continue following the online instructions to complete the installation.
Accept the default options during the remainder of the installation.
For detailed installation instructions, see the following Visual Studio Code documentation page: https://code.visualstudio.com/docs/setup/windows .
Install .NET SDK
dotnet --version
and pressing the Enter key.Open a new Internet browser window.
To open the download page for the .NET SDK, navigate to the following URL:
On the Download .NET page, select the recommended version of the .NET SDK.
Wait for the installer file to finish downloading.
Run the .NET SDK installer file.
On a Windows PC, you can find your Downloads folder using File Explorer. Double-click the installation file to begin the installation process.
On the .NET SDK Installer window, select Install.
Wait for the installation to complete.
Installation should take about a minute. Once installation is complete, a message displays confirming the installation was successful.
To close the installer window, select Close.