This repo has been archived. You should now be using dotnet new for these scenarios.
This was truly a community project, with more than 50 contributors. I'd like to specifically thank the following people for their significant contributions. This project couldn't have been a success without you.
If you have some issue with the code and want to discuss, find us on twitter.
NOTE: The content has been updated for .NET Core 1.0 SDK – RC4 (
.csprojbased) both LTS (1.0) and Current (1.1) versions
- Dependencies:
- Node.js:
brew install nodefor Mac OS X,choco install nodejsfor Windows OS - Yeoman:
npm install -g yo - Bower
npm install -g bower
- Node.js:
- Install:
npm install -g generator-aspnet - Run:
yo aspnet
See also: Building Projects with Yeoman on docs.asp.net
-
yo aspnetshows a wizard for generating a new ASP.NET Core app -
yo aspnet --helpshows flags and other configurable options
Full, template based projects available in generator:
- Empty Web Application
- Empty Web Application (F#)
- Console Application
- Console Application (F#)
- Web Application
- Web Application Basic [without Membership and Authorization]
- Web Application Basic [without Membership and Authorization] (F#)
- Web API Application
- Web API Application (F#)
- Nancy ASP.NET Application
- Class Library
- Class Library (F#)
- MSTest Test project (MSTest)
- xUnit Test project (xUnit.net)
- Unit Test project (MSTest) (F#)
- xUnit Test project (xUnit.net) (F#)
Hey, we encourage you to contribute to .Net Core templates project: https://github.com/dotnet/templating in order to put community efforts into a single source project used by everyone in ecosystem. Thanks!
The Nancy project is based on framework's "Hello World" template: Nancy Getting Started: Introduction
The xUnit test project uses xUnit: a free, open source, community-focused unit testing tool for the .NET Framework
The F# Templates are based on Core F# Templates projects. They were translated into F# from the original ASP.NET Templates
The templates that use client-side libraries are calling the bower install script to install Bower managed dependencies. You can skip the installation process by passing the --skip-install option to the generator, e.g. yo aspnet --skip-install. This should allow for a better experience when Development has been enabled.
The templates support both LTS and Current version of runtime. The LTS version is enabled by default (or enforced by --version-lts option). You can switch to Current version at any time by passing --version-current option when invoking generator: yo aspnet --version-current.
The project type and application name can be specified as optional command line arguments:
yo aspnet [projecttype [applicationname] [uiframework]]The valid project types are:
webfor Empty Web Applicationconsolefor Console Applicationmvcfor Web Applicationmvcbasicfor Web Application Basicwebapifor Web API Applicationnancyfor Nancy ASP.NET Applicationclasslibfor Class LibrarymstestMSTest Test project (MSTest)xunitxUnit Test project (xUnit.net)fsharp_webfor F# Empty Web Applicationfsharp_consolefor F# Console Applicationfsharp_classlibfor F# Class Libraryfsharp_webapifor F# Web API Applicationfsharp_mvcbasicfor F# Web Application Basicfsharp_mstestfor F# Unit Test project (MSTest)fsharp_xunitfor F# xUnit Test project (xUnit.net)
The valid UI framework types are:
bootstrapfor Bootstrap (this is the default and does not have to be specified explicitly)semanticfor Semantic UI
Example:
yo aspnet mvcbasic "my semantic app" semanticwill create a "Web Application Basic" project called "my semantic app" using the Semantic UI framework.
Example:
yo aspnet mvcbasic "my bootstrap app"ORyo aspnet mvcbasic "my bootstrap app" bootstrapwill create a "Web Application Basic" project called "my bootstrap app" using the Bootstrap framework.
The alphabetic list of available sub generators (to create files after the project has been created):
** Note: files generated are created in the working directory, no conventions are forced **
Creates a new NuGet.config file.
Example:
yo aspnet:nugetconfig
Produces NuGet.config
Creates a new Web Config file
Example:
yo aspnet:webconfig
Produces web.config
Copyright 2014-2017 OmniSharp
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
