Skip to content

Opinionated starter template for new .NET solutions with a focus on strictness and consistency

License

Notifications You must be signed in to change notification settings

qnku/dotnet-starter

Repository files navigation

.NET Starter Template

This is an opinionated starter template for new .NET solutions with a focus on strictness and consistency. It encompasses frequently used files and settings that you would typcially expect in a large scale (enterprise) project.

Key Features

  • Includes commonly needed files like Directory.Build.props in "Solution Items" for easy access, eliminating the need to navigate through file explorers for edits.
  • Enables the Central Package Management feature.
  • Enables the RestorePackagesWithLockFile feature.
  • Adds a global.json file for consistent SDK and runtime settings.
  • Enforces TreatWarningsAsErrors and sets the analysis level to "Recommended" for non-test projects.

This template is adaptable but not one-size-fits-all. I encourage you to fork it and modify as per your project requirements.

Getting Started

Install the template by running:

dotnet new install .

To generate a new solution:

dotnet new qsln --name MySolution

Testing changes

Changes made to the template can be tested by running the test.ps1 script. This will generate a new solution to the testoutput directory.

About

Opinionated starter template for new .NET solutions with a focus on strictness and consistency

Topics

Resources

License

Stars

Watchers

Forks