Scott Hanselman

DotNet Boxed includes prescriptive templates for .NET Core

February 11, 2021 Comment on this post [3] Posted in DotNetCore | Open Source | VS2019
Sponsored By

This is pretty cool. As you may know, when you type "dotnet new" from the command line, or if you turn on the Visual Studio preview feature "Show all .NET Core templates in the New Project Dialog" that you see a bunch of potential starter templates. These are basic jumping off points for your next new project.

Turn on Visual Studio 2019 Preview features for .NET Core

Some folks feel there should be more included "out of the box." Enter "dotnet-boxed" templates! You can install them from the command line easily like this:

dotnet new --install Boxed.Templates

You can confirm they are there by running dotnet new at the command line. The new "boxed" templates have a different tag:

Templates                    Short Name  Tags
ASP.NET Core API Boxed api .NET Boxed/Cloud/Service/Web
ASP.NET Core GraphQL Boxed graphql .NET Boxed/Cloud/Service/Web
ASP.NET Core Orleans Boxed orleans .NET Boxed/Cloud/Service/Web
NuGet Package Boxed nuget .NET Boxed/Library

Let's try them out! I can see them here in the File New Project dialog in VS2019:

.NET boxed in Visual Studio 2019

There's a really nice project that sets up a NuGet package right from File New! It can even set up Test, GitHub Actions, .editorconfig, license, cake build, code of conduct, and more. All that boring boilerplate is done for you!

File | New | NuGet Package

This is just one template example, there are also ones for WebAPIs, GraphQL projects, and Microsoft Orleans projects.

DotNet-boxed is a great community supported project! Head over to GitHub now and give them a STAR and get involved! Even better, I see some "help wanted" issues on their GitHub. I'm sure they'd appreciate your help.

Sponsor: Tired of not finding the code you're looking for? Get Sourcegraph universal code search and search code across ALL your repos, languages, and code hosts. Find and fix code fast with Sourcegraph. Try it now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
February 17, 2021 0:28
Are there any special things to do to see custom templates in VS. We have our templates available in CLI but they are not visible in VS (with "Show all .NET Core templates.." enabled)?
February 19, 2021 17:57
thank you for the order "dotnet new" as you say it's life changing, no more boring routine

<a href"">Surplus</a>
February 19, 2021 17:59
thank you for the order "dotnet new" as you say it's life changing, no more boring routine


Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.