https://github.com/kolosovpetro/dotnettemplate
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.
https://github.com/kolosovpetro/dotnettemplate
dotnet-project dotnet-template template
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/kolosovpetro/dotnettemplate
- Owner: kolosovpetro
- Created: 2022-12-15T18:55:19.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-26T11:51:17.000Z (about 2 years ago)
- Last Synced: 2025-03-27T08:45:12.197Z (about 2 months ago)
- Topics: dotnet-project, dotnet-template, template
- Language: C#
- Homepage:
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 40
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# .NET project template
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.## Nuget packages
### Compile time code style checking
- `Microsoft.CodeAnalysis.NetAnalyzers`
### Unit tests project
- `coverlet.msbuild`
- `coverlet.collector`
- `FluentAssertions`## Required property groups in project file
```xml
true
Recommended
true```
## Commands
- `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`## Sources
- [Defining formatting rules in .NET with EditorConfig](https://blog.genezini.com/p/defining-formatting-rules-in-.net-with-editorconfig)
- [Enforcing .NET code style rules at compile time](https://blog.genezini.com/p/enforcing-.net-code-style-rules-at-compile-time)
- [Analyzing and enforcing .NET code coverage with coverlet](https://blog.genezini.com/p/analyzing-and-enforcing-.net-code-coverage-with-coverlet)
- [SonarCloud via GitHub Actions](https://github.com/kolosovpetro/SonarCloudViaGithubActions)
- [How to build a .NET template and use it within Visual Studio. Part 1: Key concepts](https://www.mytechramblings.com/posts/create-dotnet-templates-for-visual-studio-part-1/)
- [How to build a .NET template and use it within Visual Studio. Part 2: Creating a template package](https://www.mytechramblings.com/posts/create-dotnet-templates-for-visual-studio-part-2/)