New cyclic dependency between modules (ARCH1203)
Ce contenu n’est pas encore disponible dans votre langue.
Key dotnet.architecture.new-dependency · Severity warning · Category architecture
Merge requests only. Flags a change that makes one namespace depend on another which, on the default branch, already depends on it (directly or within three steps): the two now depend on each other. Only dependencies made by code count (parameters, fields, calls); property types (entity navigations, DTOs carrying DTOs) do not. Namespaces most of the codebase depends on, and a namespace with its own parent or child, are not counted.
Incorrect
Section titled “Incorrect”// Billing/InvoiceService.cs - on the default branch Shipping already depends on Billingusing Shipping;
public class InvoiceService(ParcelTracker tracker) { }Correct
Section titled “Correct”public class InvoiceService(IShipmentStatus status) { } // interface owned by Billing, implemented in Shipping