dotnet-archunitnet

Enforce architecture rules in .NET test projects using ArchUnitNET.

8|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills --skill dotnet-archunitnet-postpartum-genushyacinthus29
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-archunitnet
Source: https://github.com/Postpartum-genushyacinthus29/dotnet-skills/tree/main/skills/dotnet-archunitnet
Command: npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills --skill dotnet-archunitnet-postpartum-genushyacinthus29

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

ArchUnitNET provides open-source architecture testing for .NET projects, enabling rigorous rules to ensure clean boundaries and maintainable code beyond basic dependency checks.

Core Features & Use Cases

  • Rich architecture rules for .NET tests using ArchUnitNET, enabling boundary enforcement, layered dependencies, and domain constraints.
  • Framework integrations with xUnit, MSTest, TUnit, and others to plug into existing test suites.
  • Artifact generation and guidance for architecture validation, reviews, and CI integration.
  • Use Case: In a large solution with multiple projects, enforce that Infrastructure never depends on Presentation, or that certain namespaces stay within layers.

Quick Start

Configure ArchUnitNET in your test project and begin writing architecture tests that enforce boundaries and dependencies.

Frequently Asked Questions about dotnet-archunitnet

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce architecture rules in .NET test projects?

You can enforce architecture rules in .NET by defining architectural boundaries and writing tests with ArchUnitNET. It loads target assemblies and validates layer dependencies, ensuring infrastructure never depends on presentation within your test suite.

What is architecture testing and when do I need it for .NET?

Architecture testing validates structural boundaries in .NET applications. You need it when basic dependency checks are insufficient, and you must enforce rigorous rules like layered dependencies and domain constraints across multiple projects in a large solution.

Can I use ArchUnitNET with xUnit, MSTest, or TUnit frameworks?

Yes, ArchUnitNET provides framework integrations for xUnit, MSTest, and TUnit. It uses adapters to wire architecture tests directly into your existing .NET test suites for continuous boundary validation.

How do I prevent cross-layer dependencies in a large .NET solution?

To prevent cross-layer dependencies, configure ArchUnitNET in your test project to define boundaries and write tests that enforce constraints. This ensures certain namespaces stay within layers, like blocking infrastructure from referencing presentation.

What is the best way to integrate architecture validation into CI for .NET?

The best way to integrate architecture validation into CI is configuring ArchUnitNET tests within your .NET test projects. It generates artifacts and provides guidance for architecture validation, running boundary checks automatically during your build pipeline.

Does ArchUnitNET support enforcing domain constraints beyond basic dependency checks?

Yes, ArchUnitNET supports enforcing domain constraints beyond basic dependency checks. It enables rich architecture rules for .NET tests, allowing you to validate boundary enforcement, layered dependencies, and specific domain constraints across loaded assemblies.