NetEvolve.Defaults.Analyzer 1.5.0

Prefix Reserved
dotnet add package NetEvolve.Defaults.Analyzer --version 1.5.0
                    
NuGet\Install-Package NetEvolve.Defaults.Analyzer -Version 1.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetEvolve.Defaults.Analyzer" Version="1.5.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetEvolve.Defaults.Analyzer" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="NetEvolve.Defaults.Analyzer">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NetEvolve.Defaults.Analyzer --version 1.5.0
                    
#r "nuget: NetEvolve.Defaults.Analyzer, 1.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NetEvolve.Defaults.Analyzer@1.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NetEvolve.Defaults.Analyzer&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=NetEvolve.Defaults.Analyzer&version=1.5.0
                    
Install as a Cake Tool

NetEvolve.Defaults.Analyzer

NetEvolve.Defaults.Analyzer is a comprehensive diagnostic analyzer package that enforces consistent and high-quality NuGet package configurations across your projects. Built on the Roslyn compiler platform, it provides real-time analysis and validation of project file metadata, package properties, and build settings—ensuring that all packable projects meet enterprise-grade quality standards and best practices.

Overview

This analyzer package is an integral part of the NetEvolve.Defaults ecosystem and focuses on maintaining consistency and quality in NuGet package configurations. It automatically validates critical aspects of your projects including:

  • Package Metadata Validation: Ensures all required package properties (PackageId, PackageVersion, PackageDescription, etc.) are properly configured
  • Repository Information: Validates repository URL, issue tracker, and license metadata for discoverability
  • Author & Contact Details: Enforces complete author information and contact guidelines for professional package metadata
  • Project Configuration Standards: Verifies compliance with NetEvolve.Defaults configuration patterns and conventions
  • Build Target Verification: Validates that deprecated build configurations are replaced with modern standards
  • Real-Time Diagnostics: Provides immediate feedback during development with actionable error messages and fix suggestions

Installation

Using the .NET CLI

dotnet add package NetEvolve.Defaults.Analyzer

Manual Package Reference

Add the following to your project file (.csproj, .fsproj, or .vbproj):

<PackageReference Include="NetEvolve.Defaults.Analyzer" Version="x.x.x" PrivateAssets="all" />

Note: The PrivateAssets="all" attribute is recommended to prevent the analyzer from being included as a transitive dependency in projects that consume your package.

Diagnostic Rules

The analyzer enforces the following diagnostic rules:

Rule ID Category Severity Description
NED0001 PackageMetadata Error Missing or incomplete <PackageId> tag configuration
NED0002 PackageMetadata Error Missing or incomplete <PackageDescription> tag configuration
NED0003 PackageMetadata Error Missing or incomplete package <Authors> configuration
NED0004 PackageMetadata Error Missing or incomplete package license information
NED0005 PackageMetadata Error Missing or incomplete repository URL configuration
NED0006 PackageMetadata Error Missing or incomplete issue tracker URL configuration
NED0007 ProjectConfiguration Error Missing or incomplete copyright notice configuration
NED0008 ProjectConfiguration Warning Project does not follow recommended build configuration patterns
NED0009 ProjectConfiguration Warning Missing recommended documentation XML file generation configuration
OLD0001 DeprecatedConfiguration Warning Project uses deprecated NetEvolve build configuration patterns

For detailed information about each rule, including remediation steps and examples, consult the diagnostic documentation.

For NuGet Packages

To ensure optimal analyzer effectiveness for packable projects, configure your project file with:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
    
    
    <PackageId>Your.Package.Namespace</PackageId>
    <PackageVersion>1.0.0</PackageVersion>
    <PackageDescription>Brief description of your package's purpose and functionality</PackageDescription>
    <Authors>Your Name;Other Contributors</Authors>
    <RepositoryUrl>https://github.com/owner/repo</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <PackageProjectUrl>https://github.com/owner/repo</PackageProjectUrl>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <BugReportUrl>https://github.com/owner/repo/issues</BugReportUrl>
    <Copyright>Copyright (c) 2025 Your Organization. All rights reserved.</Copyright>
  </PropertyGroup>
</Project>

For Non-Packable Projects

The analyzer intelligently handles non-packable projects (e.g., test projects, console applications) and provides context-appropriate diagnostics:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <IsPackable>false</IsPackable>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
</Project>

Features

  • Zero Configuration: Works out-of-the-box with sensible defaults; no additional setup required
  • Real-Time Feedback: Integrated with Visual Studio and other Roslyn-compatible editors for instant diagnostics
  • Actionable Messages: Every diagnostic includes clear descriptions and remediation guidance
  • Development Dependency: Automatically excluded from package transitive dependencies
  • Performance Optimized: Efficient compilation-end analysis minimizes build time impact
  • Multi-Targeting Support: Works seamlessly with projects targeting multiple frameworks

Integration with NetEvolve.Defaults

This analyzer is designed to complement the NetEvolve.Defaults build configuration package. Together, they provide:

  • Unified quality standards across your organization
  • Automated enforcement of best practices and conventions
  • Seamless integration with modern .NET development workflows
  • Consistent NuGet package quality and discoverability

For complete project standardization, install both packages in your projects:

dotnet add package NetEvolve.Defaults
dotnet add package NetEvolve.Defaults.Analyzer

Suppressing Diagnostics

If you need to suppress a specific diagnostic, use the standard Roslyn suppression mechanism:

#pragma warning disable NED0001
// Code or configuration here
#pragma warning restore NED0001

Alternatively, add to your .editorconfig:

[*.csproj]
# Disable specific diagnostics for this project
dotnet_diagnostic.NED0001.severity = none

Troubleshooting

Analyzer not appearing in diagnostics

Ensure the package reference includes PrivateAssets="all":

<PackageReference Include="NetEvolve.Defaults.Analyzer" Version="x.x.x" PrivateAssets="all" />

False positives on non-packable projects

Verify that non-packable projects have <IsPackable>false</IsPackable> set in their project files.

Build errors after installation

Clean and rebuild your solution:

dotnet clean
dotnet build

Documentation

License

This project is part of the NetEvolve ecosystem. Please refer to the LICENSE file for licensing details.

Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NetEvolve.Defaults.Analyzer:

Package Downloads
NetEvolve.Defaults

Source Only package, which provides the standard configurations and settings for the NetEvolve projects. Such as `.editorconfig`, build props and targets.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0 886 12/9/2025
1.4.81 4,626 11/30/2025
1.4.78 756 11/28/2025
1.4.72 1,734 11/23/2025
1.4.63 2,533 11/14/2025
1.4.59 1,171 11/12/2025
1.4.58 359 11/11/2025
1.4.55 3,049 11/11/2025
1.4.49 1,187 11/8/2025
1.4.47 272 11/7/2025
1.4.44 1,087 11/2/2025
1.4.37 849 10/24/2025
1.4.25 766 10/6/2025
1.4.19 887 9/24/2025
1.4.0 1,331 7/10/2025
1.3.115 2,406 6/22/2025
1.3.108 1,907 6/11/2025
1.3.102 1,250 6/1/2025
1.3.101 243 6/1/2025
1.3.99 221 6/1/2025
1.3.86 1,665 5/8/2025
1.3.80 4,586 5/4/2025
1.3.79 432 5/1/2025
1.3.74 1,710 4/9/2025
1.3.71 514 4/8/2025
1.3.70 945 4/1/2025
1.3.69 2,614 3/11/2025
1.3.68 328 3/10/2025
1.3.67 296 3/10/2025
1.3.66 641 3/6/2025
1.3.61 981 2/19/2025
1.3.60 217 2/19/2025
1.3.59 910 2/18/2025
1.3.57 1,861 1/30/2025
1.3.53 409 1/29/2025
1.3.52 219 1/29/2025
1.3.48 791 1/29/2025
1.3.47 982 1/23/2025
1.3.39 1,324 1/8/2025
1.3.36 600 1/1/2025
1.3.32 323 1/1/2025
1.3.28 1,093 12/20/2024
1.3.25 772 12/17/2024
1.3.18 1,156 12/11/2024
1.3.9 1,005 11/28/2024
1.3.6 293 11/27/2024
1.2.1 1,039 11/21/2024
1.1.15 441 11/20/2024
1.1.12 475 11/19/2024
1.1.8 481 11/19/2024
1.1.6 216 11/19/2024
1.1.5 234 11/18/2024