mcaf-dotnet-netarchtest

Enforce .NET architecture rules with NetArchTest.Rules fluent assertions.

4|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/managedcode/MCPGateway --skill mcaf-dotnet-netarchtest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcaf-dotnet-netarchtest
Source: https://github.com/managedcode/MCPGateway/tree/main/.codex/skills/mcaf-dotnet-netarchtest
Command: npx skills add https://github.com/managedcode/MCPGateway --skill mcaf-dotnet-netarchtest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces architectural rules within .NET projects, ensuring code adheres to defined standards for namespaces, dependencies, and layering, preventing architectural drift.

Core Features & Use Cases

  • Architecture Rule Enforcement: Define and automatically verify rules against project code.
  • Dependency Checks: Prevent forbidden dependencies between project layers or modules.
  • Namespace Layering: Ensure code is organized according to a defined architectural hierarchy.
  • Use Case: Automatically fail a build if the UI layer directly references the Data layer, enforcing a clean separation of concerns.

Quick Start

Use the mcaf-dotnet-netarchtest skill to add architecture tests for forbidden dependencies.

Frequently Asked Questions about mcaf-dotnet-netarchtest

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

FAQPage Schema
How do I enforce .NET architecture rules to prevent dependency drift?

Automating .NET architecture enforcement uses fluent assertions within unit tests to verify namespaces, dependencies, and layering, preventing architectural drift across project layers.

Can I automatically fail a build if the UI layer directly references the Data layer?

Yes, you can fail a build if the UI layer directly references the Data layer by defining automated dependency checks that enforce a clean separation of concerns during your unit tests.

What is the best way to verify namespace layering in a dotnet project?

The best way to verify namespace layering is by defining architectural hierarchy rules and executing automated checks to ensure code organization adheres to those defined standards.

Does this approach work for checking forbidden dependencies between modules?

Yes, this approach works for checking forbidden dependencies by applying rule enforcement against project code to prevent unauthorized references between distinct modules or project layers.

Why do I need architecture tests for dependency analysis in dotnet?

You need architecture tests for dependency analysis in dotnet to satisfy the need for concrete project deltas, reduced ambiguity, and reusable project context for architecture verification.