Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

ArchUnitNET

> 编程语言
Open source

A C# architecture test library to specify and assert architecture rules in C# for automated testing.

1.3K stars0 likes0 views
WebsiteGitHub

About

A C# architecture test library to specify and assert architecture rules in C# for automated testing.

ArchUnitNET

Visit our documentation at https://archunitnet.readthedocs.io/en/latest/.

ArchUnitNET is a free, simple library for checking the architecture of C# code. It is the C# fork of https://www.archunit.org/ for Java. ArchUnitNET can check dependencies between classes, members, interfaces, and more. This is done by analyzing C# bytecode and importing all classes into our C# code structure. The main focus of ArchUnitNET is to automatically test architecture and coding rules.

An Example

To use ArchUnitNET, install the ArchUnitNET package from NuGet:

PS> Install-Package TngTech.ArchUnitNET

If you want to use xUnit, NUnit or MSTestV2 for your unit tests, you should instead install the corresponding ArchUnit extension:

PS> Install-Package TngTech.ArchUnitNET.xUnit
PS> Install-Package TngTech.ArchUnitNET.xUnitV3
PS> Install-Package TngTech.ArchUnitNET.NUnit
PS> Install-Package TngTech.ArchUnitNET.MSTestV2

Create a Test

Then you will want to create a class to start testing. We used xUnit with the ArchUnit extension here, but it works similarly with NUnit or other Unit Test Frameworks.

…

Run the tests

Since ArchUnitNET is reading the architecture form the analyzed binaries, it is recommended to run ArchUnitNET-based tests in Debug configuration.

dotnet test -c Debug

For more details on known edge cases, see the documentation.

Further Info and Help

Check out test examples for the current release at ArchUnitNET Examples.

License

ArchUnitNET is published under the Apache License 2.0. For more information concerning the license, see Apache License 2.0.

Contributors ✨

Thanks to all the people who have contributed to the project.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言