s

.NET 5.0 Getting Started edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 14 November 2020 | 3789

In this article, I will provide step-by-step instructions on how to get started with .Net code 5.0. To start developing applications using .net and visual studio the first thing would be to download and install the latest version of Visual Studio. Check this article for help on how to install visual studio. Once you have a visual studio installed follow the steps below.

Step 1: Install the .Net SDK

Open this link https://dotnet.microsoft.com/download/dotnet/5.0 and download the latest version of the sdk.

I have downloaded the x64 for windows. and installed the SDK. I checked the current version of the SDK installed on my machine by going to the command prompt and typing dotnet --list-sdk . I was surprised to see that I already have the latest version of .Net 5.0 SDK installed. This might have happened because I had updated my visual studio 2019 a few minutes back.

Since I had downloaded the .Net 5.0 SDK I decided to run it.

Step 2: Hello World Console Application

Now we will write a hello world console application using .net 5.0. To do this

        1. Open Visual Studio 2019
        2. Select Create a New Project
        3. Select .Net Core Console Application
        4. You can see that the application has been created
        5. Right click on the project & select properties. Change the Target Framework to 5.0
        6. Run the application to execute your first .Net 5.0 console application

Setep 3: .Net 5.0 Web Application

Now we will write an asp .net mvc .Net 5.0 web application.

          1. Open Visual Studio 2019
          2. Click on Create New Project
          3. Select asp .Net core web application
          4. Enter Project Name & Select the solutions director
          5. Click on Create
          6. Change Famework Version to .Net Core 5.0
            Select ASP.NET Core Web App ( Model-View-Contoller) Template
            Change Authentication To Indivual User Account
            Click on create to create project
          7. Run your first asp .net 5.0 mvc application