Lindhart.DependencyCop 0.1.0

dotnet add package Lindhart.DependencyCop --version 0.1.0
                    
NuGet\Install-Package Lindhart.DependencyCop -Version 0.1.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="Lindhart.DependencyCop" Version="0.1.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="Lindhart.DependencyCop" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Lindhart.DependencyCop">
  <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 Lindhart.DependencyCop --version 0.1.0
                    
#r "nuget: Lindhart.DependencyCop, 0.1.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 Lindhart.DependencyCop@0.1.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=Lindhart.DependencyCop&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Lindhart.DependencyCop&version=0.1.0
                    
Install as a Cake Tool

DependencyCop

This package is a fork of the original Liversen.DependencyCop by Lars Iversen, enhanced with automatic code fixing capabilities.

Migrating from Liversen.DependencyCop? All rule IDs remain unchanged (DC1001, DC1002, DC1003, DC1004), so your existing configurations will continue to work without modification.

This package contains a number of Roslyn analyzer rules using the .NET Compiler Platform. The rules enforce certain restrictions on dependencies between code in different namespaces.

Rules

Rule DC1001: Using namespace statements must not reference disallowed namespaces

Rule DC1002: Code must not refer code in descendant namespaces

Rule DC1003: Code must not contain namespace cycles

Rule DC1004: Rule DC1001 is not configured


📖 For complete documentation, rationale, and details about the fork, see the main repository README.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 101 5/1/2026 0.1.0 is deprecated because it has critical bugs.