Hello, In this article I will discuss about the latest .NET framework introduced by Miscrosoft. The latest framework is known as .NET core. I will discuss about the prerequisites to get started with ASP.NET core. We will develop our first web application in the newly introduced framework.
Prerequisites for getting started in .NET core
Before starting development in .NET core you should ensure if the latest framework is available on your system or not. Please follow to ensure and get it.
- We should use Visual Studio 2015 or above to work on .NET core. I have community edition which is free to use for anyone. You can download the community edition from this link.
- If you install the community edition now you will get it with update 3.
- If you already have visual studio installed you should check whether update 3 is installed or not.
- To check go to the Help > About Microsoft Visual Studio and check for the update as shown in the below figure.
- If the update is not installed in that case you can navigate to this link. and download the .NET core run time installer based on the configuration of your system.
- After the installation of the .NET core framework we need to install the Visual Studio Tool (Preview 2) from the same link.
Building my First .NET Core Web Application
In this part of the article I will give you the step by step guide to develop your first “Hello world” .NET core web application.The folder and file structure of the .NET core application is new which I will discuss in the next article
- Open the visual studio. Go to File > New > Project.
- The new project pop up will open. Go to .NET Core tab under Visual C#. Select ASP.NET Core web application(.NET Core) from the installed templates as shown in the below figure
- In the next step select “Empty” template from the ASP.NET core templates as shown in the below figure’
- I have named the project as “MyFirstCoreApp”. A new project is created and we can see the project structure as shown in the below figure. Once the “Restoring packages” message goes away we can debug the project. I will discuss about the Folder structure and different configuration files in the later part of this article.
- If we run the application(F5) we can see the web application running in the browser. The application by default runs in IISExpress. As you can see in the below figure the application is running on port 57093 on my system.
Folder Structure And important Files in ASP.NET Core application
If I look into the file and folder structure in the solution explorer we can see many new files which are different from the usual ASP.NET mvc application. We can see a folder named wwwroot and files named global.json, project.json. I will discuss all of them one by one in my next article.