Zechy
Zechy

Reputation: 45

C# How to prepare project template/skeleton

I'm currently building in work a Base code structure for C# API microservices. In future, we will surely make more of these, so I would like create something like "base project or something like this".

I am aware there is system of Project Templates in C#, but from what I learned on tens of pages, I didn't come to solution from which I would be happy. I would like to build it in to single template file, which everyone can download, import and start with it... I always ended up with template imported directly from source to dotnet templates and couldn't find the generated template file. How can I make it? (I'm using JetBrains Rider not VS).

Or is there another techniques how to prepare some base skeleton?

Upvotes: 0

Views: 2639

Answers (1)

sommmen
sommmen

Reputation: 7658

You could ofcourse just create the project and then share that around. Then people can then simply copy that project and rename it to use it like a template.

There is of course also file templates, but that is designed to be used inside a project already: https://www.jetbrains.com/help/rider/Templates__Applying_Templates__Creating_Files_from_Templates.html

It seems that in rider2017 and later, project templates are also supported however: https://blog.jetbrains.com/dotnet/2017/12/21/project-templates-rider-2017-3/

Upvotes: 1

Related Questions