ArchitectureGuardian.Analyzers
0.3.0
dotnet add package ArchitectureGuardian.Analyzers --version 0.3.0
NuGet\Install-Package ArchitectureGuardian.Analyzers -Version 0.3.0
<PackageReference Include="ArchitectureGuardian.Analyzers" Version="0.3.0" />
<PackageVersion Include="ArchitectureGuardian.Analyzers" Version="0.3.0" />
<PackageReference Include="ArchitectureGuardian.Analyzers" />
paket add ArchitectureGuardian.Analyzers --version 0.3.0
#r "nuget: ArchitectureGuardian.Analyzers, 0.3.0"
#:package ArchitectureGuardian.Analyzers@0.3.0
#addin nuget:?package=ArchitectureGuardian.Analyzers&version=0.3.0
#tool nuget:?package=ArchitectureGuardian.Analyzers&version=0.3.0
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
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.