Use boilerplate solution with “dotnet new” and stay DRY

dotnet new

The easiest way

template_project_name
└───.template.config
template.json
{
"$schema": "http://json.schemastore.org/template",
"author": "Me",
"classifications": [
"Organization",
"Console",
"C#"
],
"identity": "shortNameOfTemplate",
"name": "Description of the template",
"shortName": "shortNameOfTemplate",
"tags": {
"language": "C#",
"type": "project"
},
"symbols": {
"projectName": {
"type": "parameter",
"datatype": "text",
"replaces": "TemplateAppSample",
"defaultValue": "TemplateAppSample"
}
}
}
dotnet new -i <absoluteOrRelativePath>
dotnet new shortNameOfTemplate

The advanced way

dotnet new -i MyTemplatePack::1.0.0 --nuget-source  http://MyPrivateNuGetServer/v3/index.json

Browsing, Updating and Uninstalling of Templates

dotnet new -u <absolutePath>
dotnet new -u MyTemplatePack

References

--

--

--

All opinions are my own || Software Developer, learner, perfectionist and entrepreneur-kind person, nonconformist. Always seeks for the order and completeness.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Matt’s Tidbits #11 — With great power comes great responsibility — a MockWebServer story

Looking for Certified Boomi Resources? Kellton Tech can Help

Errors using an Android library

How we made a complete App from scratch in 45 days | Bundl

Revisiting Maybe Monad using C# 8.0 Pattern Matching

A Journey from API Connect v5 to v10

Summing Two and Three Elements

How to split RSpec tests with Jenkins Parallel Pipeline to run faster CI builds

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alexander Goida

Alexander Goida

All opinions are my own || Software Developer, learner, perfectionist and entrepreneur-kind person, nonconformist. Always seeks for the order and completeness.

More from Medium

Creating an ASP.NET Core API Docker Container

How to convert DateTime objects to Python-friendly ISO8601 strings in C#

Connect HANA database from .NET 6 application on Docker

How to manage secrets in .NET locally and on GitHub? — Maytham Fahmi