Using MVC 6 And AngularJS 2 With .NET Core Chapter 1

In this article,

  1. Setup Environment.

  2. Overview on ASP.NET.

  3. Start with .NET Core 1.0.

  4. Explore Initial Template (Empty).

  5. How to Add MVC6.

  6. AngularJS2.

    • Manage Client-side Dependencies.

    • Use Package Manager (NPM).

    • Use Task Runner.

    • Bootstrapping, using Type Script

  7. Build & run Application

Setup Environment

Prerequisites: The following prerequisites are needed.

  1. Visual Studio 2015

  2. ASP.NET Core 1.0

Visual Studio 2015: If you already have a copy of Visual Studio 2015 installed, you may update Visual Studio 2015 with Update 3.
Or
Download Visual Studio Community 2015 for free.

.NET Core Downloads:

You may download one of these:

  1. .NET Core SDK (Software Development Kit/Command Line Interface) tools.

  2. .NET Core 1.0.0 - VS 2015 Tooling Preview 2 (Run apps with the .NET Core runtime).

We are all set to go. Before we dive into our main topic, let’s get an overview on ASP.NET.

Overview on ASP.NET
Let’s differentiate both.

.NET Framework

  1. Developed and run on Windows platform only.

  2. Built on the .NET Framework runtime.

  3. Supported (MVC, Web API & SignalR) Dependency Injection (DI).

  4. MVC & Web API Controller are separated.

.Net Core

  1. Open Source.

  2. Developed & run on Cross Platform.

  3. Built on the .NET Core runtime & also on .NET Framework.

  4. Facility of dynamic compilation.

  5. Built in Dependency Injection (DI).

  6. MVC & Web API Controller are unified, Inherited from same base class.

  7. Smart tooling (Bower, NPM, Grunt & Gulp).

  8. Command-line tools.

Start with .NET Core 1.0

Let’s create a new project with Visual Studio 2015 > File > New > Project.

Choose empty template and click OK.

Visual Studio will create a new project of ASP.NET Core empty project.

We will now explore all initial files one by one.

Explore Initial Template

Those marked from Solution Explorer are going to be explored, one by one.