This page is a work in progress.You can help improve it. →

How to use dotnet new with the SDG Templates

dotnet new can create new projects using C# and the dotnet frameworks. SDG has created a number of templates to assist students with creating projects.

sdg-consoleSDG Console App TemplateRuns a console based application without a database
sdg-console-databaseSDG Console App with Database TemplateSame as sdg-console but adds database support
sdg-apiSDG Web API TemplateRuns an web API based application without a database
sdg-reactSDG React + .NET TemplateCombines a web API with Database support and a REACT based front end app

NOTE: All of the templates containing database support use the PostgreSQL database engine.


If you are missing these templates you can install them via

dotnet new --install SDG.templates.Console
dotnet new --install SDG.templates.Console.Database
dotnet new --install SDG.templates.Web.API
dotnet new --install SDG.templates.Web.React
dotnet new --install SDG.templates.Web.React.NoClientApp


dotnet new sdg-react -o NameOfProject

Replace sdg-react with the specific template name you wish to use and NameOfProject with a camel cased project name preferably with a letter as the first character of the project name.

During setup it will ask if you wish to create a GitHub repository. You should say YES if you intend to push to github.

Recreating a project

If you recreate a project with the same name, it will link to the existing github repository. So if you have to recreate a project we recommend using a new unique name or deleting the old github project before creating a new local project

© 2017 - 2021; Built with ♥ in St. Petersburg, Florida.