Show Menu
Cheatography

Creating a .Net Core MVC Project Template Cheat Sheet (DRAFT) by

A step by step guide to creating a new `dotnet new` project template

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Step 0 - Reference Info

Step 1 - Folder Setup / File Creation

- Custom­Tem­pla­teD­irName
-- src
--- Content
Create a new directory where you want to locate your custom template files. Then create the following folder structure inside it
dotnet new sln -n slnFil­eName
Using your console, create a solution file Inside the src directory
dotnet new mvc -o Templa­teP­roj­ectName
In the Content folder create new project of the type you want to create the template from.
The project name is not critical at this point
dotnet sln Founda­tio­nMV­CwM­ySQ­L.sln add Conten­t\F­oun­dat­ion­MVC­wMy­SQL­\Fo­und­ati­onM­VCw­MyS­QL.c­sproj
Run this command from the directory your .sln file is in. Add your project to the sln file
 

Step 2

Open your solution file and add the Project you created to it.