SeamGuard.Tool 0.1.0.1

There is a newer version of this package available.
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
                    
if you are setting up this repo
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
                    
nuke :add-package SeamGuard.Tool --version 0.1.0.1
                    

<p align="center"> <img src="assets/logo.svg" alt="SeamGuard logo" width="189"> </p>

SeamGuard

Build Publish NuGet Analyzer NuGet Tool

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.
  • InternalsVisibleTo friend 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 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.

Version Downloads Last Updated
0.2.0.4 91 7/17/2026
0.1.1.2 94 7/16/2026
0.1.0.1 90 7/16/2026