Getting Started with ASP.Net Core

ASP.Net Core is an open-source and cross-platform, lean and modular framework for building high-performance web applications


ASP.Net has been around for about 15 years now and has been extremely popular among the web development community. ASP.Net Core is essentially ASP.Net with a new look. It's an open-source and cross-platform framework for building modern day applications.

Note that ASP.Net Core 1.0 is not an extension to ASP.Net 4.6. Rather, it's a completely new framework -- a rewrite of the ASP.Net 4.6 framework. You can take advantage of ASP.Net core to build your IoT applications, web applications, back-end services for mobile, etc. Scott Hanselman states: "ASP.Net Core 1.0 is not a continuation of ASP.Net 4.6. It is a whole new framework, a side-by-side project which happily lives alongside everything else we know. It is an actual re-write of the current ASP.Net 4.6 framework, but much smaller and a lot more modular."

If we look back, here's the list of Microsoft's web application development frameworks have evolved for the last two decades.

Microsoft released Visual Studio 2015 Update 3 and Team Foundation Server (TFS) 2015 Update 3 along with .Net Core 1.0 in June this year. You can download a copy of Visual Studio 2015 Update 3 from this link.

Some of the design goals of ASP.Net Core include the following:

ASP.Net Core now enables you to build and run ASP.Net Core applications on Windows, Linux, or even MacOS. Microsoft states: "ASP.Net Core is a lean and composable framework for building web and cloud applications. ASP.Net Core is fully open source and available on GitHub. ASP.Net Core is available on Windows, Mac, and Linux."

Here's a quick look at the recent changes in the Microsoft stack.

  • ASP.Net 5 has now become ASP.Net Core 1.0
  • .Net Core 5 has now become .Net Core 1.0
  • Entity Framework 7 has now become Entity Framework Core 1.0 (also known as EF Core 1.0)

Incidentally, ASP.Net Core leverages .Net Core which in turn is composed of the following components:

  1. The Microsoft .Net Runtime -- this provides features like, type system, garbage collection, native interop, loading assemblies, etc.
  2. The Framework libraries -- this helps you to work with the primitive data types and fundamental utilities.
  3. The SDK tools and Language Compilers -- these enable you to work with the .Net Core SDK

Note that .Net Core is compatible with .Net Framework, Xamarin, and Mono - thanks to the .Net Standard Library. You can learn more on .Net Core from this link.

Creating your first ASP.Net Core Application

In this section we will explore on how we can get started using ASP.Net Core in Visual Studio. Assuming that .Net Core is installed in your system, you'll see three templates for creating Web Projects in your Visual Studio 2015 IDE. These include the following:

  1. .Net Web Application
  2. .Net Core Web Application (.Net Core)
  3. .Net Core Web Application (.Net Framework)

Assuming that Visual Studio Community Edition 2015 and .Net Core is installed in your system, follow these steps to create your first ASP.Net Core application in Visual Studio 2015.

  1. In the Visual Studio 2015 IDE, click on File > New > Project.
  2. Select "ASP.Net Core Web Application (.Net Core)" from the list of the templates displayed
  3. Specify a name for the project
  4. Click OK to save
  5. Select Web Application

And, that’s all you need to do! If all packages have been successfully restored, you can press F5 to execute your first ASP.Net Core application in Visual Studio 2015 IDE.

Copyright © 2016 IDG Communications, Inc.

InfoWorld Technology of the Year Awards 2023. Now open for entries!