An opinionated set of files and configurations usefull to enforce coding best practices and uniformity in .NET 8 projects
Just copy all the files into the root of your target solution and/or related subfolders as needed (if and when an override/extension is required).
If your root already contains one or more of these file, you will need to merge them manually.
This folder represents the root directory containing all the projects of the solution, and contains the following files:
- Directory.Build.props → This is the backbone gluing together the other configuration files. It defines the basic NuGet dependencies (and the related configuration files) applied to all the projects in the root folder and its subfolders.
- .editorconfig → Define an opinionated set of global rules applied to the editor and enforced into the build process via the Roslyn Analyzers referenced by Directory.Build.props:
- Lindhart.Analyser.MissingAwaitWarning → NuGet / GitHub
- Microsoft.CodeAnalysis.NetAnalyzers → NuGet / GitHub
- Microsoft.VisualStudio.Threading.Analyzers → NuGet / GitHub
- Philips.CodeAnalysis.DuplicateCodeAnalyzer → NuGet / GitHub. This analyzer is also parametrized using the DuplicateCode.Allowed.txt file
- Global.ruleset → define the code styling rules enforced by StyleCop and its StyleCop.Analyzers NuGet package (NuGet / GitHub)
- BannedSymbols.txt → the configuration file used by the Roslyn Analyzer Microsoft.CodeAnalysis.BannedApiAnalyzers (NuGet / GitHub)
- DuplicateCode.Allowed.txt → the file containing the exceptions allowed by the Philips.CodeAnalysis.DuplicateCodeAnalyzer (NuGet / GitHub)
- RiderInspectionSettings.xml → the configuration file used by JetBrains Rider for the editor inspections