This is a template for creating .NET projects with compile-time code style checking, CI/CD workflows for Github Actions and Azure pipelines. Also, includes SonarCloud integration.
Microsoft.CodeAnalysis.NetAnalyzers
coverlet.msbuild
coverlet.collector
FluentAssertions
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>Recommended</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=../TestResults
dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.8.6
reportgenerator "-reports:TestResults.opencover.xml" "-targetdir:coveragereport" -reporttypes:Html
dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=TestResults -p:SkipAutoProps=true -p:Threshold=80
- Defining formatting rules in .NET with EditorConfig
- Enforcing .NET code style rules at compile time
- Analyzing and enforcing .NET code coverage with coverlet
- SonarCloud via GitHub Actions
- How to build a .NET template and use it within Visual Studio. Part 1: Key concepts
- How to build a .NET template and use it within Visual Studio. Part 2: Creating a template package