Getting Started With ASP.Net Core On Windows

What’s ASP.NET Core?

ASP.NET Core is an open source and a cross platform framework to develop Cloud based applications like web applications, IoT applications, and mobile-based backend applications. It can run on both platforms like .NET Core or .NET Framework. You are able to develop the apps and run the apps with a different platform like Windows, Linux and Mac.

You can see the following improvements in ASP.NET Core, as given below-

  • A unified story for building Web UI and Web APIs.
  • Integration of the modern client-side frameworks and development of the Work flows.
  • A Cloud-ready environment-based configuration system.
  • Built-in dependency injection.
  • New light-weight and modular HTTP request pipeline.
  • Ability to host on IIS or self-host in your own process.
  • Built on .NET Core, which supports true side-by-side versioning.
  • Ships entirely as NuGet packages.
  • New tooling, which simplifies the modern Web development.
  • Build and run cross-platform ASP.NET apps on Windows, Mac and Linux.
  • Open source and community focused.

Let's start being prerequisite

You have to download the following software and install them on your PC-

  • Visual Studio 2015.
  • Visual Studio 2015 Update 3.
  • .NET Core 1.0.0 - VS 2015 Tooling Preview 2.
  • .NET Core 1.0.0 - SDK Preview 2.

You can download and install the free community edition of Visual Studio 2015 from Visual Studio Community portals.

You can download and install Visual Studio 2015 Update 3 and .NET Core 1.0.0 - VS 2015 Tooling Preview 2 here.

Setting up the Environment on Windows

If you want to know how to install the DotNetCore.1.0.0-SDK.Preview2-x64, the step-by-step guidelines are given below-  

Creating a ASP.NET Core Application and run it in Windows

We are going to discuss, how to develop, build and run the apps with a different way such as Command line, Visual Studio, Visual Studio Code Editor, etc. We will see the step by step guidelines for ASP.NET Core app creation here.

I. Using Command line procedures as below

  • Open cmd.exe (run as Administrator).
  • Type mkdir HelloWorldWebApp and enter in the command line.
  • Type cd HelloWorldWebApp and enter in the command line.

  • Type dotnet new -t web and enter in the command line.

  • You can see ASP.NET core Application project structure in the screenshot, given below-

  •  Type dotnet restore and enter in the command line.

     
  • After some time, installing requires component to be completed in the screenshot, as given below-

  • Type dotnet run and enter in the Command line.

     

II. Using Visual Studio 2015 procedures as below

Open Visual Studio 2015. Go to file menu, point to new and then click new project. New Project Window will open, you can select an installed template like “.NET Corein Visual C# Template and then select a ASP.NET Core Web Application (.NET Core) and type Project name ASP.NETCoreHelloWorldApp. Choose the project location path and then click OK button.

 

You can select a template “Web Application” and click OK button.

 
 
Now, you can see ASP.NETCoreHelloWorldApp project structure, as shown in the screenshot, given below-
 
 
 
Now, you can run the Application with debug mode.
 
 
 
Reference

Conclusion

I hope you understood ASP.Net Core, features of ASP.NET Core, setting up the environment, creating a Hello World Web Application and running on it. I have covered all the required things. If you find anything which I missed in this article, please let me know. Please share your valuable feedback or suggestions.