Personix.ArchitectureTests 1.1.0

dotnet add package Personix.ArchitectureTests --version 1.1.0
                    
NuGet\Install-Package Personix.ArchitectureTests -Version 1.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="Personix.ArchitectureTests" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Personix.ArchitectureTests" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Personix.ArchitectureTests" />
                    
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 Personix.ArchitectureTests --version 1.1.0
                    
#r "nuget: Personix.ArchitectureTests, 1.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 Personix.ArchitectureTests@1.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=Personix.ArchitectureTests&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Personix.ArchitectureTests&version=1.1.0
                    
Install as a Cake Tool

Personix.ArchitectureTests

Shared Clean Architecture enforcement helpers built on NetArchTest.Rules.

What's included

Type Purpose
ICleanArchitectureAssemblies Interface mapping your assemblies to CA layers
CleanArchitectureRules Static methods for each standard dependency rule
ArchitectureTestResult Value-object result with a human-readable failure message
CleanArchitectureTestBase xUnit base class – inherit and get all rules as auto-generated Facts

Usage

// Architecture.Tests project in your solution
internal sealed class MyLayerAssemblies : ICleanArchitectureAssemblies
{
    public Assembly Domain        => typeof(global::Domain.AssemblyMarker).Assembly;
    public Assembly Application   => typeof(global::Application.AssemblyMarker).Assembly;
    public Assembly? Infrastructure => typeof(global::Infrastructure.AssemblyMarker).Assembly;
    public Assembly? Persistence  => typeof(global::Persistence.AssemblyMarker).Assembly;
    public Assembly? Presentation => typeof(global::Presentation.AssemblyMarker).Assembly;
}

public class ArchTests : CleanArchitectureTestBase
{
    protected override ICleanArchitectureAssemblies Assemblies { get; } = new MyLayerAssemblies();
    // All 5 standard Facts are now executed automatically.
}

Option B – Call rules individually

var assemblies = new MyLayerAssemblies();
var result = CleanArchitectureRules.DomainMustNotDependOnOtherLayers(assemblies);
Assert.True(result.IsSuccessful, result.FailingMessage());

Standard rules enforced

  1. Domain must not depend on Application, Infrastructure, Persistence or Presentation
  2. Application must not depend on Infrastructure, Persistence or Presentation
  3. Infrastructure must not depend on Presentation
  4. Persistence must not depend on Infrastructure
  5. Persistence must not depend on Presentation

Rules for null assemblies are automatically skipped (e.g. when you have no Persistence layer).

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.0 104 8/27/2026
1.0.0 121 8/1/2026

1.1.0 — adds a net11.0 target alongside net10.0. No API change.