Joydip Kanjilal
Contributor

Getting Started with ASP.Net Core

opinion
Jul 29, 20163 mins
Software Development

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.

  • 1996 — Active Server Pages
  • 2002 — ASP.Net
  • 2008 — ASP.Net MVC
  • 2012 — ASP.Net Web API and SignalR

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:

  • Cross platform
  • High performance
  • Flexible deployment
  • Open source
  • Support for built-in dependency injection
  • Light-weight and modular
  • Side by side support
  • Faster development

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.

Joydip Kanjilal
Contributor

Joydip Kanjilal is a Microsoft Most Valuable Professional (MVP) in ASP.NET, as well as a speaker and the author of several books and articles. He received the prestigious MVP award for 2007, 2008, 2009, 2010, 2011, and 2012.

He has more than 20 years of experience in IT, with more than 16 years in Microsoft .Net and related technologies. He has been selected as MSDN Featured Developer of the Fortnight (MSDN) and as Community Credit Winner several times.

He is the author of eight books and more than 500 articles. Many of his articles have been featured at Microsoft’s Official Site on ASP.Net.

He was a speaker at the Spark IT 2010 event and at the Dr. Dobb’s Conference 2014 in Bangalore. He has also worked as a judge for the Jolt Awards at Dr. Dobb's Journal. He is a regular speaker at the SSWUG Virtual Conference, which is held twice each year.

More from this author