Articles → ASP.NET CORE → Create Your First Asp.Net Core Project

Create Your First Asp.Net Core Project






Why ASP.NET Core?





Create Your First Asp.Net Core Application




  1. Open Visual Studio 2019.
  2. Click on "File" → "New" → "Project…".
  3. A popup window will appear. Click the option "ASP.NET Core Web Application" and then click the "Next" button.
  4. Picture showing the asp.net core web application template while creating the new project
    Click to Enlarge

  5. A window will appear to enter the "Project name" and "Location". Once the "Project name" is entered, click the "Create" button.
  6. Picture showing a window to enter the solution and the project name
    Click to Enlarge

  7. In the next window, select the type of .NET Core application. For this example, we will create a "Web Application".
  8. Picture showing the list of application types that asp.net core provides
    Click to Enlarge

  9. Click the "Create" button to create a new application.

Project Structure




Picture showing the project structure of the asp.net core project
Click to Enlarge



Folder NameDescriptionParent Folder
wwwroot folderThis folder contains the static files i.e., script, style, image, and static HTML files
Page FolderThis folder contains the view, page model, and layout files.
Shared FolderThis folder contains 2 files, i.e., _Layout.cshtml and _ValidationScriptsPartial.cshtml Page Folder
_Layout.cshtmlThis is the layout (or master) page.Shared Folder
_ValidationScriptsPartial.cshtmlThis script file is required for validations in ASP.NET Core projectShared Folder
_ViewImports.cshtmlThis file contains the code to include tag helpers in the projectPage Folder
_ViewStart.cshtmlThis file tells the project about which layout (or master page) is included in every projectPage Folder
Views fileThe files Index.cshtml and Privacy.cshtml are the view files. These files are used for creating UIPage Folder





Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, February 17, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250