SeamGuard.Tool
0.1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global SeamGuard.Tool --version 0.1.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local SeamGuard.Tool --version 0.1.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SeamGuard.Tool&version=0.1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package SeamGuard.Tool --version 0.1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
<p align="center"> <img src="assets/logo.svg" alt="SeamGuard logo" width="189"> </p>
SeamGuard
SeamGuard is a C# Roslyn analyzer for enforcing JSON-defined architectural boundaries during .NET builds.
SeamGuard runs as an installed analyzer or as a .NET tool that injects the analyzer for one build. Both modes use the same configuration format.
What SeamGuard checks
- Behavioral types declared by a project, filtered by kind and visibility.
- Direct type references and constructor dependencies.
- Direct project and NuGet package references.
InternalsVisibleTofriend assemblies.- Mock providers and mocked types in test code.
- Layered project and type rules with namespace and kind filters.
Quick start
dotnet add package SeamGuard.Analyzer
Create .seamguard/config.json beside the solution or in the project directory or one of its ancestors.
{
"version": 1,
"projects": {
"General.Core": {
"projectReferences": {
"deny": ["General.Data"]
},
"rules": [
{
"target": "General.Core.Services.**",
"constructorDependencies": {
"allow": ["System.**", "General.Contracts.**"],
"deny": ["General.Data.**"]
}
}
]
}
}
}
dotnet build reports forbidden crossings as SGA diagnostics.
The tool runs SeamGuard without adding an analyzer reference to the target repository.
dotnet tool install --global SeamGuard.Tool
dotnet seam build path\to\Project.sln --config path\to\.seamguard\config.json -- -c Release
Documentation
Scope
SeamGuard evaluates structural facts available to Roslyn and MSBuild. The configuration supplies the architecture rules.
| Product | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.