Skip to main content
Link
Menu
Expand
(external link)
Document
Search
Copy
Copied
Home
Configuration of .NET project file analyzers
.NET Project File Analyzers SDK
Rules
MSBuild
Packaging
Proj0200: Define the project packability explicitly
Proj0201: Define the project version explicitly
Proj0202: Define the project description explicitly
Proj0203: Define the project authors explicitly
Proj0204: Define the project tags explicitly
Proj0205: Define the project repository URL explicitly
Proj0206: Define the project URL explicitly
Proj0207: Define the project copyright explicitly
Proj0208: Define the project release notes explicitly
Proj0209: Define the project readme file explicitly
Proj0210: Define the project license explicitly
Proj0211: Avoid using deprecated license definition
Proj0212: Define the project icon file explicitly
Proj0213: Define the project icon URL explicitly
Proj0214: Define the NuGet project ID explicitly
Proj0215: Provide a compliant NuGet package icon
Proj0216: Define the product name explicitly
Proj0240: Enable package validation
Proj0241: Enable package baseline validation
Proj0242: Generate NuGet packages conditionally
Proj0243: Generate software bill of materials
Proj0244: Generate documentation file
Proj0245: Don’t mix Version and VersionPrefix/VersionSuffix
Proj0246: Define VersionPrefix if VersionSuffix is defined
Proj0600: Avoid generating packages on build if not packable
Publishing
Proj0400: Define the project publishability explicitly
Test Projects
Proj0450: Test projects should not be packable
Proj0451: Test projects should not be publishable
Proj0452: Test projects require Microsoft.NET.Test.Sdk
Proj0453: Using Microsoft.NET.Test.Sdk implies a test project
SDK
Proj0700: Avoid defining items in SDK project
Central Package Management
Proj0800: Configure Central Package Management explicitly
Proj0801: Include ‘Directory.Packages.props’
Proj0802: Enable Central Package Management centrally
Proj0803: Use VersionOverride only with Central Package Management enabled
Proj0804: Use Version only with Central Package Management not enabled
Proj0805: Define version for PackageReference
Proj0806: VersionOverride should change the version
Proj0807: Use Directory.Packages.props only for Central Package Management
Analyzers
Proj1000: Use the .NET project file analyzers
Proj1001: Use analyzers for packages
Proj1002: Use Microsoft’s analyzers
Proj1003: Use Sonar analyzers
General
Proj0001: MS Build project file could not be located
Proj0002: Upgrade legacy MS Build project files
Proj0003: Define usings explicit
Proj0004: Run NuGet security audits automatically
Proj0005: Define package reference assets as attributes
Proj0006: Add additional files to improve static code analysis
Proj0007: Remove empty nodes
Proj0008: Remove folder nodes
Proj0009: Use the <TargetFramework> node for a single target framework
Proj0010: Define the project output type explicitly
Proj0011: Define properties once
Proj0012: Reassign properties with different value
Proj0013: Include package references only once
Proj0014: Include project references only once
Proj0015: Order package references alphabetically
Proj0016: Order project references alphabetically
Proj0017: Can’t create alias for static using directive
Proj0018: Order using directives by type
Proj0019: Order using directives alphabetically
Proj0020: Item group should only contain nodes of a single type
Proj0021: Build actions should have a single task
Proj0022: Build action includes should exist
Proj0023: Use forward slashes in paths
Proj0024: Order package versions alphabetically
Proj0025: Migrate from ruleset file to .editorconfig file
Proj0026: Remove IncludeAssets when redundant
Proj0027: Override <TargetFrameworks> with <TargetFrameworks>
Proj0028: Define conditions on level 1
Proj0029: Use C# specific properties only when applicable
Proj0030: Use VB.NET specific properties only when applicable
Proj0031: Adopt preferred casing of nodes
Proj0032: Migrate away from BinaryFormatter
Proj0033: Project reference includes should exist
Other
Proj1100: Avoid using Moq
Proj1101: Package references should have stable versions
Proj1200: Exclude private assets as project file dependency
Resources
Proj2000: Embed valid resources
Proj2001: Define data in a resource file
Proj2002: Sort resource file values alphabetically
Proj2003: Add invariant fallback resources
Proj2004: Add invariant fallback value
Proj2005: Escape XML nodes of resource values
Proj2100: Indent RESX
INI
Proj4000: Invalid INI file
Proj4001: Invalid INI Header
Proj4002: Invalid INI key-value pair
Proj4010: Sections should contain at least one key-value pair
Editorconfig
Proj4050: Header must be a GLOB
Proj4051: Use equals sign for key-value assignments
Generic
Proj3000: Only use UTF-8 without BOM
Proj3001: Track uses of “TODO” tags
Formatting
Proj1700: Indent XML
Proj1701: Use <![CDATA[ for large texts
Proj1702: Omit XML declarations
NuGet packages
Sonarcloud
Light mode
Dark mode
.NET project file analyzers on GitHub
Rules
Generic
Table of contents
Proj3000: Only use UTF-8 without BOM
Proj3001: Track uses of “TODO” tags