For an internal project at work using ASP.NET MVC/AngularJS we’ve decided to convert the existing code to ASP.NET Core using Angular(4).
So I’ve started my research and encountered two particular methods:

Angular Quickstart

Angular Quickstart contains an Angular application which you can use to quickly start your new Single Page Application with. This app is basic as the documentation mentions and requires you to configure your app to make it production-ready.

dotnet command line tool

The dotnet command line tool is installed when you install Visual Studio 2017 including all ASP.NET CORE components. This tool allows you to download project templates which can be used to create a project.

Get started

For our project we decided to use the dotnet command line tool because this tool offers a lot of out-of-the-box solutions for setting up ASP.NET Core in combination with Angular and preparing the configuration for development and production.

To install the dotnet command line tool click here for more information.
I’ve installed the tool using the Visual Studio 2017 installation including ASP.NET Core packages.
I opened up “Command Prompt” on my Windows machine which has VS2017 installed and enter the following commands:

mkdir MyProject

cd MyProject

dotnet new

dotnet new –install microsoft.aspnetcore.spatemplates::*

dotnet new angular

npm install

start MyProject.csproj

Once Visual Studio is loaded use F5 to start our application with debugging or CTRL+F5 without debugging

dotnet new– initializes the tool
dotnet new –install microsoft.aspnetcore.spatemplates::*– this will download the Single page Application templates availabledotnet new angular – this will create a new Single Page Application project based on the folder name

Directory structure MyProject

Template structure

The created template structure includes the following elements:

ClientApp– TypeScript files of the Angular app like modules and components

Controllers– C# MVC Controllers

node_modules– contains the installed npm libraries included from package.json