Creating a new Angular project on Mac with Visual Studio

Viewed 5705

I'm currently going through a https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2017-Launch/WEB-103 on setting up Spa apps with Visual Studio on Mac (macOS Sierra, Visual Studio Community 2017).

I've successfully installed angular core, and am currently trying to create a new project based off of one of the installed templates.

I can see two angular templates when I run sudo dotnet new -l:

MVC ASP.NET Core with Angular angular [C#] Web/MVC/SPA ASP.NET Core with Angular angular [C#] Web/MVC/SPA

When running sudo dotnet new angular, I keep getting the following error:

Unable to determine the desired template from the input template name: angular.
The following templates partially match the input. Be more specific with the template name and/or language.

Templates                          Short Name      Language      Tags       
----------------------------------------------------------------------------
MVC ASP.NET Core with Angular      angular         [C#]          Web/MVC/SPA
ASP.NET Core with Angular          angular         [C#]          Web/MVC/SPA


Examples:
    dotnet new angular
    dotnet new angular
    dotnet new --help

Is there something in the command I'm missing? Is something with Visual Studio / dotnet configured incorrectly?

2 Answers

With .netcore 2.1

dotnet new angular -o my-new-app
cd my-new-app

Now on 2.1 the package.json is inside client app

    cd ClientApp
    npm install
    dotnet restore
    dotnet run
Related