Skip to content
This repository has been archived by the owner on Sep 21, 2018. It is now read-only.

Building and Running

Phil Henning edited this page May 13, 2016 · 9 revisions

How to build

Prerequisites

The following are required in order to build the template projects:

To build the templates and a generated sample, 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 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 intermediate\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\intermediate\Test\StarterWeb [dev]> dotnet run

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 intermediate\test folder.

From here you can build, debug and test the template.** Note that in some cases, the released Visual Studio tooling may be lagging behind what the template repository is using. When that is the case, you will only be able to run the templates via dotnet run as described above.**