Skip to content

dotnet-project-file-analyzers/dotnet-project-file-analyzers.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET project file analyzers logo

.NET project file analyzers

is a NuGet package containing Roslyn (static code) analyzers that report issues on .NET project files.

The documentation reflects the current repository state of the features, not the released ones. Check the Release Notes to understand if the documented feature you want to use has been released.

Purpose

We consider all files in a project - so not only those who are compiled - part of the codebase. We strongly believe that all files should be easy to read, maintain, or to adjust. Our analyzers help with that. They spot noise, bugs, inconsistencies, incorrect formatting, and misusage.

All rules come with a clear explanation on why the spotted issue is a bad practice, and how the code should be adjusted. We hope, that as a result, developers using our analyzers also learn a thing while working with them.

Installation

DotNetProjectFile.AnalyzersDotNetProjectFile.Analyzers

To use the analyzers, you must include the analyzer package in your project file:

<Project Sdk="Microsoft.NET.Sdk">

  <ItemGroup>
    <PackageReference Include="DotNetProjectFile.Analyzers" Version="*" PrivateAssets="all" />
  </ItemGroup>

</Project>

Or via the command line:

dotnet package add DotNetProjectFile.Analyzers

Configuration

How to configure (the severity of) rules is described here.

Sdk

.NET Project File Analyzers ships with its own SDK. This allows files shared by multiple projects to be analyzed. More info can be found here.

GitHub repository

The source code can be found at GitHub: github.com/dotnet-project-file-analyzers.

Issues and suggestions

Issues (false positives, false negatives, etc.), and (rule) suggestions can be reported a the GibHub repository.

MS Build project file rules

Packaging

Publishing

Test projects

Licensing

.NET Project File Analyzers SDK

Central Package Management

Analyzers

Formatting

Other

Resource file rules

Generic

INI

.editorconfig

Sonar integration

By default, results by .NET project file analyzers are not added to Sonar's reporting. Read here how to configure this correctly.

License

.NET project file analyzers is licensed under MIT.

Releases

No releases published

Packages

No packages published

Languages