Starting a Angular 2 project, with ASP.NET Core in VS2017

Prerequistes:

  1. Visual Studio 2017 (you need to install workloads “ASP.NET and web development” and “.NET Core cross-platform development”(not sure…))
  2. Node.js version 6 or later

Please note that you need Visual Studio 2017 release version. This version of Visual Studio include .NET core version 1.0.0. To verify, you can type the following command in command prompt:

dotnet --version

FIRST, you should install the Microsoft ASP.NET Core SPA (Single Page Application) templates. Type the following command in command prompt:

dotnet new --install Microsoft.AspNetCore.SpaTemplates::*

Then, use the following command, a template project will be created:

dotnet new angular

After that, you can use Visual Studio 2017 to open the .csproj file. The project can be compiled and run immediately without any modification.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s