SeamGuard.Analyzer 0.1.0.1

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SeamGuard.Analyzer" Version="0.1.0.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SeamGuard.Analyzer" Version="0.1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="SeamGuard.Analyzer">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SeamGuard.Analyzer --version 0.1.0.1
                    
#r "nuget: SeamGuard.Analyzer, 0.1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SeamGuard.Analyzer@0.1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SeamGuard.Analyzer&version=0.1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=SeamGuard.Analyzer&version=0.1.0.1
                    
Install as a Cake Tool

<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.

There are no supported framework assets in this package.

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.

Version Downloads Last Updated
0.2.0.4 39 7/17/2026
0.1.1.2 46 7/16/2026
0.1.0.1 40 7/16/2026