SeamGuard.Analyzer
0.1.0.1
See the version list below for details.
dotnet add package SeamGuard.Analyzer --version 0.1.0.1
NuGet\Install-Package SeamGuard.Analyzer -Version 0.1.0.1
<PackageReference Include="SeamGuard.Analyzer" Version="0.1.0.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="SeamGuard.Analyzer" Version="0.1.0.1" />
<PackageReference Include="SeamGuard.Analyzer"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add SeamGuard.Analyzer --version 0.1.0.1
#r "nuget: SeamGuard.Analyzer, 0.1.0.1"
#:package SeamGuard.Analyzer@0.1.0.1
#addin nuget:?package=SeamGuard.Analyzer&version=0.1.0.1
#tool nuget:?package=SeamGuard.Analyzer&version=0.1.0.1
<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.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.