Yeoman generators Creating an ASP. NET Application

Source: Internet
Author: User
Tags install node

Yeoman generators Creating an ASP. NET Application

Previous: "Windows build. NET Cross-platform environment and run applications"

Read the catalogue:

    1. Install node. js
    2. Install yeoman-generators
    3. Create ASP. NET WEB Application
    4. Run ASP. Web Application

The console application in the previous article, the code is we handwritten, on two files: HelloWorld.cs and Project.json, very simple, do not use Visual Studio 2015 and other editors, how do we create and run an ASP. The answer is to use Yeoman generators, and we'll do it step-by-step.

1. Install node. js

Download the latest version from the node. JS website and follow it:

It should be noted that the version of node. js must be 0.10.0 or more, or it will hold the following error:

2. Install yeoman-generators

Install the command correctly (for Windows):

install -g yo generator-aspnet

Error Install command (for other systems):

install -g generator-aspnet

The correct installation is successful:

Error installation succeeded:

3. Create ASP. NET WEB Application

To create a command:

PS > yo aspnet

Select item:

Complete the operation:

ASPNET. Sample File Structure:

4. Run ASP. Web Application

The ASPNET is created. After Sample, there are four commands:

If the following error occurs in the execution dnu, you can set the following environment variable: %userprofile%\.dnx\runtimes\<runtime name>\bin or execute the next dnvm upgrade command.

The first step:

restore

Step Two:

PS > dnu build

Step Three:

PS > dnx . web

Fourth step: Browser input localhost:5000

. NET cross-platform, where the Windows environment is built, and then try the Mac OS X system again.

Yeoman generators Creating an ASP. NET Application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.