Click here to Skip to main content
15,886,873 members
Articles / All Topics

Creating ASP.NET 5 Web Application using Yeoman Generator

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
20 Sep 2015MIT1 min read 6.4K   2   1
In this post we will explore the ASP.NET 5 Yeoman generator. What is Yeoman? Yeoman is a set of tools that facilitates building web applications. To use Yeoman, you need to install nodejs and yo package. So here is the installation steps for ASP.NET 5 Yeoman generator.

In this post we will explore the ASP.NET 5 Yeoman generator. What is Yeoman? Yeoman is a set of tools that facilitates building web applications. To use Yeoman, you need to install nodejs and yo package. So here is the installation steps for ASP.NET 5 Yeoman generator.

  • Install Node from https://nodejs.org/
  • Once node installed, you can install Yo using npm. – npm install -g yo
  • After installing yo, you need to install ASP.NET 5 generator using npm install -g generator-aspnet command.

You can follow the steps to create a ASP.NET 5 project using Yeoman Generator

  • Once yeoman generator installed, you can execute the “yo aspnet” command to invoke ASP.NET 5 project creation wizard.

    Yeoman Generator - Wizard

    Yeoman Generator – Wizard

  • From the list of available project types, you can select the required one using arrow keys.(I selected the Web Application Basic [without Membership and Authorization] project type.)

    Yeoman Generator - Select Project type

    Yeoman Generator – Select Project type

  • After selecting the project type and press enter, you need to provide the project name, or simply enter, it will take the default one.

    Yeoman Generator - Project generation

    Yeoman Generator – Project generation

Once complete Yeoman Generator generates the project and you can execute the DNVM commands to restore the packages and host the application in the development server (WebListener). You need to install “dnu restore” first, then execute “dnx . web” command, it will restore the packages and host the application in http://localhost:5000. Here is the output. You can get the URL from config.ini file or project.json file.

ASP.NET 5 Application generated with ASP.NET 5 Yeoman Generator

ASP.NET 5 Application generated with ASP.NET 5 Yeoman Generator

You can use yo aspnet --help to get more details about the options and other configuration options.

Happy Programming :)

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Technical Lead
India India
Working as Tech. Lead

My blog : dotnetthoughts.net.
You can follow me in twitter : @anuraj

Comments and Discussions

 
QuestionGood article!!! Pin
Talking Dotnet17-Dec-15 23:47
Talking Dotnet17-Dec-15 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.