The dotnet new command uses template fast-growing as a single-page application, this article takes angular application as an example.
The most recent version of the. NET Core SDK RC4 has been updated with the dotnet new command.
dotnet New does not create a console app by default, but displays help, and displays different help based on the current directory content.
First make sure that the. NET Core SDK RC4 is installed successfully.
Dotnet--version
The output is as follows:
1.0.0-rc4-004771
Create a console project and run it with the following command:
dotnet New Console
dotnet Restore
Dotnet Run
dotnet New command details:
dotnet New Command Installation template
Install a single-page app spa template
dotnet New--install Microsoft.AspNetCore.SpaTemplates::*
* Indicates getting the latest version of the template, which is obtained from NuGet.
Install and then execute the dotnet new command, as follows:
Will find a few more templates.
The following uses dotnet new angular to quickly create a angular project.
Then execute the project with the following effect:
The entire command is as follows:
dotnet New Angular
dotnet Restore
Dotnet Run
There are also react kncokout and other templates, not too much to introduce here.
If you want to do the corresponding development, you need to install the corresponding JS package, using NPM Install, Nodejs need version 6 or more.
Reference Document: https://blogs.msdn.microsoft.com/webdev/2017/02/14/ building-single-page-applications-on-asp-net-core-with-javascriptservices/
If you think this article is helpful to you, please click " recommend ", thank you.
dotnet new command to use templates to generate angular apps