DotNetProjectFile.Analyzers
1.5.2
See the version list below for details.
dotnet add package DotNetProjectFile.Analyzers --version 1.5.2
NuGet\Install-Package DotNetProjectFile.Analyzers -Version 1.5.2
<PackageReference Include="DotNetProjectFile.Analyzers" Version="1.5.2"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add DotNetProjectFile.Analyzers --version 1.5.2
#r "nuget: DotNetProjectFile.Analyzers, 1.5.2"
// Install DotNetProjectFile.Analyzers as a Cake Addin #addin nuget:?package=DotNetProjectFile.Analyzers&version=1.5.2 // Install DotNetProjectFile.Analyzers as a Cake Tool #tool nuget:?package=DotNetProjectFile.Analyzers&version=1.5.2
.NET project file analyzers
The package contains analyzers that analyze .NET project files.
MS Build project file rules
- 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 TragetFramework node for a single target framework
- Proj0010 Define OutputType 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
Packaging
- Proj0200 Define IsPackable 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 ID explicitly
- Proj0240 Enable package validation
- Proj0241 Enable package baseline validation
- Proj0242 Generate NuGet packages conditionally
- Proj0243 Generate software bill of materials
- Proj0600 Avoid generating packages on build if not packable
Publishing
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
.NET Project File Analyzers SDK
Central Package Management
- Proj0800 Configure Central Package Management
- Proj0801 Include 'Directory.Packages.props'
- Proj0802 Enable Central Package Management centrally
- Proj0803 Only use VersionOverride when CPM is enabled
- Proj0804 Only use Version when CPM is 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
Formatting
Other
- Proj1100 Avoid using Moq
- Proj1101 Package references should have stable versions
- Proj1200 Exclude private assets as project file dependency
Resource file rules
- Proj2000 Embed valid resource files
- Proj2001 Define data in a resource file
- Proj2002 Sort resource file values alphabetically
- Proj2003 Add invariant fallback resources
- Proj2004 Add invariant fallback values
- Proj2005 Escape XML nodes of resource values
- Proj2100 Indent RESX
Generic
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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on DotNetProjectFile.Analyzers:
Repository | Stars |
---|---|
phmonte/Buildalyzer
A utility to perform design-time builds of .NET projects without having to think too hard about it.
|
Version | Downloads | Last updated | |
---|---|---|---|
1.5.3 | 144 | 12/23/2024 | |
1.5.2 | 2,357 | 11/28/2024 | |
1.5.1 | 773 | 11/22/2024 | |
1.5.0 | 1,293 | 11/14/2024 | |
1.4.8 | 534 | 11/12/2024 | |
1.4.7 | 1,267 | 11/4/2024 | |
1.4.6 | 3,892 | 10/9/2024 | |
1.4.5 | 650 | 10/2/2024 | |
1.4.4 | 1,956 | 9/13/2024 | |
1.4.3 | 250 | 9/11/2024 | |
1.4.2 | 484 | 9/6/2024 | |
1.4.1 | 679 | 9/3/2024 | |
1.4.0 | 212 | 9/2/2024 | |
1.3.1 | 508 | 8/28/2024 | |
1.3.0 | 220 | 8/27/2024 | |
1.2.4 | 851 | 8/14/2024 | |
1.2.3.2 | 250 | 8/13/2024 | |
1.2.3.1 | 144 | 8/13/2024 | |
1.2.3 | 148 | 8/13/2024 | |
1.2.2 | 2,592 | 6/28/2024 | |
1.2.1 | 5,968 | 2/28/2024 | |
1.2.0 | 1,211 | 2/21/2024 | |
1.1.0 | 9,573 | 9/19/2023 | |
1.0.14 | 207 | 9/18/2023 | |
1.0.13 | 733 | 9/4/2023 | |
1.0.12 | 762 | 8/16/2023 | |
1.0.11 | 477 | 8/9/2023 | |
1.0.10 | 434 | 8/3/2023 | |
1.0.9 | 722 | 7/21/2023 | |
1.0.8 | 336 | 7/18/2023 | |
1.0.7 | 2,921 | 7/16/2023 | |
1.0.6 | 284 | 7/13/2023 | |
1.0.5 | 241 | 7/10/2023 | |
1.0.4 | 179 | 7/10/2023 | |
1.0.3 | 210 | 7/10/2023 | |
1.0.2 | 195 | 7/8/2023 | |
1.0.1 | 234 | 7/7/2023 | |
1.0.0 | 195 | 7/5/2023 |
v1.5.2
- Proj4000: Defensive on unparsable INI files. (BUG)
v1.5.1
- Proj0243: Generate software bill of materials. (NEW RULE)
- Proj1200: Add packages that should be included as private assets. (FN)
- Proj3000: Inaccessible files should not lead to a crash. (BUG)
- Proj4000: Invalid INI file. (NEW RULE)
- Proj4001: Invalid INI header. (NEW RULE)
- Proj4002: Invalid INI key-value pair. (NEW RULE)
- Proj4010: Sections should contain at least one key-value pair. (NEW RULE)
- Proj4050: Header must be a GLOB. (NEW RULE)
- Proj4051: Use equals sign for key-value assignments. (NEW RULE)
v1.5.0
- Proj0700: Avoid defining <Compile> items in SDK project. (NEW RULE)
- Support .net.csproj SDK projects.
- Automatically add the project file to the additional files does not work.
v1.4.8
- Proj0029: Use C# specific properties only when applicable. (NEW RULE)
- Proj0030: Use VB.NET specific properties only when applicable. (NEW RULE)
- Proj0031: Adopt preferred casing of nodes. (NEW RULE)
- Proj0216: Define the product name explictly. (NEW RULE)
- Support Directory.Build.targets.
- Automatically add the project file to the additional files.
v1.4.7
- Proj2005: Escape XML nodes of resource values. (NEW RULE)
- Proj2100: Children of <value> should be excluded. (FP)
v1.4.6
- Proj3000: Don't crash on non-existing files. (BUG)
v1.4.5
- Proj3000: Only use UTF-8 without BOM. (NEW RULES)
- Support rules for other project file types like .editoconfig files.
- Processing files with 7 times speed improvement.
v1.4.4
- Rules should only report on self, not on imports. (BUG)
v1.4.3
- Proj0026: Remove IncludeAssets when redundant. (NEW RULE)
- Proj0027: Override <TargetFrameworks> with <TargetFrameworks>. (NEW RULE)
- Proj0028: Define conditions on level 1. (NEW RULE)
- Proj1100: Disable rule by default. (FP)
- Proj2100: Space preserved closing nodes should not be reported. (FP)
- Reading Nodes with 7% speed improvement.
v1.4.2
- Proj0025: Migrate from ruleset file to .editorconfig file. (NEW RULE)
- Proj0215: Provide a compliant NuGet package icon. (NEW RULE)
- Proj02??: Do not report on projects with <IsTestProject> set to true. (FP)
- Proj0450: Test projects should not be packable. (NEW RULE)
- Proj0451: Test projects should not be publishable. (NEW RULE)
- Proj0452: Test projects require Microsoft.NET.Test.Sdk. (NEW RULE)
- Proj0453: Using Microsoft.NET.Test.Sdk implies a test project. (NEW RULE)
- Proj1200: Added 48 more compile-time dependencies to the private-asset list. (FN)
v1.4.1
- Proj1101: Resolve version in project files only. (FP)
- Proj1701: Use <![CDATA[ for large texts. (NEW RULE)
- Proj1702: Omit XML declarations. (NEW RULE)
- Bound Directory.Build.props and Directory.Packages.props to other props files. (BUG)
v1.4.0
- Proj0800: Configure CPM. (NEW RULE)
- Proj0801: Include CPM file. (NEW RULE)
- Proj0802: Enable Central Package Management centrally. (NEW RULE)
- Proj0803: Only use VersionOverride when CPM is enabled. (NEW RULE)
- Proj0804: Only use Version when CPM is not enabled. (NEW RULE)
- Proj0805: Define version for PackageReference. (NEW RULE)
- Proj0806: VersionOverride should change the version (NEW RULE)
- Proj0807: Use only Directory.Packages.props for Central Package Management (NEW RULE)
- Proj1101: Report on <PackageVersion> too. (FN)
- Proj1101: Report on <PackageReference VersionOverride> too. (FN)
- Proj2100: Indent RESX. (NEW RULE)
v1.3.1
- Proj1101: Package references should have stable versions. (NEW RULE)
v1.3.0
- Proj0024: Order package versions alphabetically. (NEW RULE)
- Proj1700: Indent XML. (NEW RULE)
- Use AdditionalFileAction rather than CompilationAction for AdditionalFiles.
- Improve XML node position determination.
v1.2.4
- Support #pragma warning disable/restore.
- Proj0242: Generate NuGet packages conditionally. (NEW RULE)
v1.2.3
- Use special IOFile and IOPath to communicate with the file system.
- Proj0023: Use forward slashes in paths. (NEW RULE)
- Proj1002: Use Microsoft's .NET analyzers. (NEW RULE)
v1.2.2
- Proj0009: TargetFrameworks allowed when overriding imports. (FP)
v1.2.1
- Proj0021: Build actions should have a single task. (NEW RULE)
- Proj0022: Build action includes should exist. (NEW RULE)
- Proj0240: Enable package validation. (NEW RULE)
- Proj0241: Enable package baseline validation. (NEW RULE)
v1.2.0
- Proj0006: Directory.Build.Props is not required to be added as additional file. (FP)
- Proj0020: Item group should only contain nodes of a single type. (NEW RULE)
- Proj0600: Avoid <GeneratePackageOnBuild> if <IsPackable> is false. (NEW RULE)
v1.1.0
- Support of Directory.Build.props.
v1.0.14
- Proj0018: Fix false positive reports always triggering. (FP)
- Proj0018: Fix typo in message.
v1.0.13
- Proj0004: Only report when <NuGetAudit> is explicitly disabled. (FP)
v1.0.12
- Proj1200: Exclude private assets as project file dependency. (NEW RULE)
- Proj0015, Proj0016: Order references case-insensitive. (FP & FN)
v1.0.11
- Proj0015, Proj0016: Order references that are substrings of each other. (FP & FN)
- Proj1100: Avoid using Moq. (NEW RULE)
v1.0.10
- Proj0017: Can't create alias for static using directive. (NEW RULE)
- Proj0018: Order using directives by type. (NEW RULE)
- Proj0019: Order using directives alphabetically. (NEW RULE)
- Proj0202: Both <Description> and <PackageDescription> are fine. (FP)
- Improved message for Proj2002 to be more informative.
- Depend on Microsoft.CodeAnalysis.Workspaces.Common version 4.0.1.
v1.0.9
- Proj0016: Improve ordering of file paths. (FP & FN)
v1.0.8
- Proj0013: Include package references only once. (NEW RULE)
- Proj0014: Include project references only once. (NEW RULE)
- Proj0015: Order package references alphabetically. (NEW RULE)
- Proj0016: Order project references alphabetically. (NEW RULE)
- Proj0400: Define the project publishability explicitly. (NEW RULE)
- Support <Choose> nodes.
v1.0.7
- Proj0011: Define properties once. (NEW RULE)
- Proj0012: Reassign properties with different value. (NEW RULE)
- Proj0200: Define IsPackable explicitly. (NEW RULE)
- Proj0201: Define the project version explicitly. (NEW RULE)
- Proj0202: Define the project description explicitly. (NEW RULE)
- Proj0203: Define the project authors explicitly. (NEW RULE)
- Proj0204: Define the project tags explicitly. (NEW RULE)
- Proj0205: Define the project repository URL explicitly. (NEW RULE)
- Proj0206: Define the project URL explicitly. (NEW RULE)
- Proj0207: Define the project copyright explicitly. (NEW RULE)
- Proj0208: Define the project release notes explicitly. (NEW RULE)
- Proj0209: Define the project readme file explicitly. (NEW RULE)
- Proj0210: Define the project license explicitly. (NEW RULE)
- Proj0211: Avoid using deprecated license definition. (NEW RULE)
- Proj0212: Define the project icon file explicitly. (NEW RULE)
- Proj0213: Define the project icon URL explicitly. (NEW RULE)
- Proj0214: Define the NuGet project ID explicitly. (NEW RULE)
v1.0.6
- Proj0010: Define OutputType explicitly. (NEW RULE)
- Proj1001: Reported dependency with missing analyser is now nearest name match. (FP)
- Proj1001: Added 14 new package specific analyzers. (FN)
- Prop2000: Embed valid resource files. (NEW RULE)
- Prop2001: Define data in a resource file. (NEW RULE)
- Proj2002: Sort resource file values alphabetically. (NEW RULE)
- Proj2003: Add invariant fallback resources. (NEW RULE)
- Proj2004: Add invariant fallback values. (NEW RULE)
v1.0.5
- Proj1003: Sonar Analyzers defined in prop. (FP)
v1.0.4
- Proj1003: Use Sonar Analyzers. (NEW RULE)
v1.0.3
- Proj0007: <Import> is never an empty node. (FP)
v1.0.2
- Proj0006: Add additional files to improve static code analysis. (NEW RULE)
- Proj0007: Remove empty nodes. (NEW RULE)
- Proj0008: Remove folder nodes. (NEW RULE)
- Proj0009: Use the TragetFramework node for a single target framework. (NEW RULE)
- Proj1000: Use the .NET project file analyzers. (NEW RULE)
v1.0.1
- Proj0002: Added Microsoft.CodeAnalysis.Analyzers as analyzer to add. (FN)
- Proj0005: Define package reference assets as attributes. (NEW RULE)
- Proj1001: Dropped Qowaiv.Analyzers.CSharp. (FP)
v1.0.0
- Proj0001: MS Build project file could not be located. (NEW RULE)
- Proj0002: Upgrade legacy MS Build project file. (NEW RULE)
- Proj0003: Define usings explicit. (NEW RULE)
- Proj1001: Use analyzers for packages. (NEW RULE)