ASP.NET CORE : My First Web Application with using Visual Studio 2017 and Command Line Tools.

ASP.NET Core is a cross-platform, high-performance, open source framework for building modern, cloud based, Internet web applications.

There are more advantages of .NET Core over .NET Framework includes:

  1. Cross-platform. Runs on macOS, Linux, and Windows.
  2. Improved Performance.
  3. Side-by-Side app versioning.
  4. Open Source

ASP.NET Core integrates seamlessly with popular client-side frameworks and libraries, including Angular, React, and Bootstrap.

ASP.NET Core ships entirely as NuGet packages.

Build web applications using ASP.NET Core MVC:

  • The Model-View-Controller (MVC) pattern helps make your web APIs and web apps testable.
  • Razor Pages (new in ASP.NET Core 2.0) is a page-based programming model that makes building web UI easier and more productive.
  • Razor markup provides a productive syntax for Razor Pages and MVC views.
  • Tag Helpers enable server-side code to participate in creating and rendering HTML elements in Razor files.
  • Model binding automatically maps data from HTTP requests to action method parameters.
  • Model validation automatically performs client- and server-side validation.

Microsoft provides ASP.NET Core components to download for Windows/Linux/MacOS

Screenshot:

ASP.NET Core_Download

Steps for creating First My Web Application:

In this example – I am using Visual Studio 2017 with ASP.NET CORE 2.0

Step 1: New Project  and select ASP.NET Core Web Application

ASP.NET Core_1

Step 2: Below Dialog will offer you different starting points for your application – here I have selected ASP.NET CORE 2.0 and selected Empty (template)

ASP.NET Core_2

Step 3: Visual  Studio will create Project solution with Dependencies from Nuget package

ASP.NET Core_3

Step 4: open Command prompt and .NET CORE CLI

ASP.NET Core_4

ASP.NET Core_5

Step 5: Creating new project using Command Prompt – with “new” keyword it will provide list of available project templates

ASP.NET Core_6

Step 6: I choose to create Web project from Command Prompt with “web” keyword, this will going to create new web project with same name of folder – in this case it will be “ASP.NET Core”

ASP.NET Core_7

Step 7: Now we are good to Run our application from Command Prompt using keyword “run”. It is running on “http://localhost:5000/”

ASP.NET Core_8

Step 8 : This is last step to check our application in browser on localhost URL  – browser showing output “Hello world!”.

ASP.NET Core_9