Edit on GitHub

.NET Core 2.0 and ASP.NET Project Templates

There are a number of the most popular starting ServiceStack v5 Project Templates available in the GitHub organizations:

The dotnet-new script included in @servicestack/cli can be used to create projects from the available templates:

Install or update @servicestack/cli

You’ll need to have @servicestack/cli v1.0.0 or later installed. If you had a previous version you can remove it with:

$ npm uninstall -g @servicestack/cli
$ npm uninstall -g servicestack-cli   #old npm package

Before installing it again to install the latest version:

$ npm install -g @servicestack/cli

Create projects with dotnet-new

This will make the dotnet-new script available which you can use to view all the available templates by running it without any arguments:

$ dotnet-new

Which displays a list of available templates:

You can then create a project from one of the templates, e.g:

$ dotnet-new vue-spa Acme

Which will generate a new project with the folder names and source files replaced with your project name, e.g:

Visual Studio

You can run then run the Acme.sln in VS .NET 2017+ which will automatically restore and install both the .NET and npm packages when first loaded. This can take a bit of time to install everything, once it’s finished you’ll see the wwwroot folder populated with your generated Webpack app which includes a dist folder and index.html page. After these are generated you can run your App with F5 as normal.

VS Code and Project Rider

If you’re using JetBrains Rider you can install npm packages by opening package.json and run the “npm install” tooltip on the bottom right. In VS Code you’ll need to run npm install from the command-line.


If installing templates fails on Windows with “EPERM, operation not permitted”, you’ll need to temporarily disable Windows Anti Virus real-time protection: