Skip to content
This repository was archived by the owner on Sep 21, 2018. It is now read-only.
Phil Henning edited this page Sep 1, 2015 · 10 revisions

Getting Started

ASP.NET Templates provide project templates which are used in Visual Studio for creating ASP.NET 5 applications.

This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the Home repo.

How to build

In order to build the templates which include a generated sample of each template, you run the build.cmd script from the root repo folder:

c:\git\Templates [dev]> .\build.cmd

When switching between the dev and release branches or to ensure you have the latest packages, be sure to run 'git clean -xdf' from the root repo folder before building.

The build will compress the templates into multiple zip files which are written to the artifacts\build\ProjectTemplates folder.

These zip archives contain the template content which are included in Visual Studio. Do not extract the contents of these zips manually to your Visual Studio template folders, doing so can later cause issues when upgrading to a later official build of the templates.

The build also produces samples which are extracted from the generated template content. You can find these generated samples in the artifacts\build\test folder. This generated sample content is also used by the unit tests.

How to run generated samples

Command Line

In order to run from the command line, run the following from the template folder you wish to run:

C:\git\Templates\artifacts\build\Test\StarterWeb [dev]> .\run.cmd web

should result in a package restore being performed then output similar to:

running dnx web --packages "C:\git\Templates\tools\..\packages"

info : [Microsoft.Net.Http.Server.WebListener] Start

info : [Microsoft.Net.Http.Server.WebListener] Listening on prefix: http://localhost:5000/

Application started. Press Ctrl+C to shut down.

Visual Studio

First you need to set Visual Studio to restore from either the dev or release feeds, as appropriate:

For dev branch use: https://www.myget.org/F/aspnetvnext/ For release branch use: https://www.myget.org/F/aspnetrelease/

This can be set via Tools -> NuGet Package Manager -> Package Manager Settings, Package Sources.

After setting the package sources, you can then select File -> Open -> Project and browse to and open the project.json in the artifacts\build\test folder.

From here you can build, debug and test the template.

Clone this wiki locally