ArchitectureGuardian.Analyzers 0.3.0

dotnet add package ArchitectureGuardian.Analyzers --version 0.3.0
                    
NuGet\Install-Package ArchitectureGuardian.Analyzers -Version 0.3.0
                    
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="ArchitectureGuardian.Analyzers" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArchitectureGuardian.Analyzers" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="ArchitectureGuardian.Analyzers" />
                    
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 ArchitectureGuardian.Analyzers --version 0.3.0
                    
#r "nuget: ArchitectureGuardian.Analyzers, 0.3.0"
                    
#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 ArchitectureGuardian.Analyzers@0.3.0
                    
#: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=ArchitectureGuardian.Analyzers&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=ArchitectureGuardian.Analyzers&version=0.3.0
                    
Install as a Cake Tool

Architecture Guardian for .NET

Define architecture boundaries in repository-owned policy and check C# dependencies with source evidence and remediation guidance.

Install an integration

Package Entry point Requirements
ArchitectureGuardian.Cli archguard scans, inspection and CI gates .NET 10 plus an SDK compatible with the target repository
ArchitectureGuardian.Mcp archguard-mcp local stdio server Same runtime/workspace requirements as CLI
ArchitectureGuardian.Analyzers C# compiler diagnostics .NET Standard 2.0 / Roslyn 4.8+ host; no standalone .NET 10 dependency

For the CLI or MCP server:

dotnet tool install --global ArchitectureGuardian.Cli --version 0.3.0
dotnet tool install --global ArchitectureGuardian.Mcp --version 0.3.0
archguard --version
archguard --help

Keep the global tool directory on PATH. Pin matching versions when comparing integrations. The repository README contains complete global/local installation, updates, removal and first-use steps. No source build is required to use published packages.

CLI and MCP

From the target repository root, create a policy using the first-scan guide. Authorize its build logic before restore and workspace evaluation. Replace MyApp.slnx with your solution:

dotnet restore MyApp.slnx -p:Configuration=Release
archguard scan MyApp.slnx --policy architecture.guardian.yaml --configuration Release --trusted

Exit 0 means completed coverage and a passing gate; 1 means a completed failing gate; 2 leaves compliance unresolved. Scans never restore automatically.

Configure an MCP stdio client with the absolute installed archguard-mcp path and an explicit workspace root. The five read-only tools are list_rules, get_architecture, analyze_solution, explain_violation and analyze_changes. Workspace analysis requires operator trust. Follow MCP setup for client configuration and response contracts. The optional agent skill is installed separately from the repository files.

Compiler analyzer

Reference the analyzer in participating projects:

<PackageReference Include="ArchitectureGuardian.Analyzers" Version="0.3.0" PrivateAssets="all" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)architecture.guardian.yaml" />

Place these items in an ItemGroup in a root props file, or adapt paths for your project. Central package management declares the version in Directory.Packages.props. Use the same YAML v1 policy as CLI/MCP. Packaged MSBuild targets supply evaluated project/assembly metadata. YAML supplies selection and default severities; .editorconfig can override reporting for selected rules. Missing, duplicate or invalid configuration produces AG000. XML remains available for one transition release; do not configure both formats. Earlier XML-only packages require the legacy XML setup linked below.

The analyzer checks AG001, AG002 and AG004–AG006 in each compilation, without whole-solution coverage or AG003 cycle checks. Retain an independent CLI gate. See complete analyzer setup.

References

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.3.0 41 10/29/2026
0.2.0 51 10/27/2026