cCoder.CodeAnalysis
2026.8.2.1212
See the version list below for details.
dotnet add package cCoder.CodeAnalysis --version 2026.8.2.1212
NuGet\Install-Package cCoder.CodeAnalysis -Version 2026.8.2.1212
<PackageReference Include="cCoder.CodeAnalysis" Version="2026.8.2.1212" />
<PackageVersion Include="cCoder.CodeAnalysis" Version="2026.8.2.1212" />
<PackageReference Include="cCoder.CodeAnalysis" />
paket add cCoder.CodeAnalysis --version 2026.8.2.1212
#r "nuget: cCoder.CodeAnalysis, 2026.8.2.1212"
#:package cCoder.CodeAnalysis@2026.8.2.1212
#addin nuget:?package=cCoder.CodeAnalysis&version=2026.8.2.1212
#tool nuget:?package=cCoder.CodeAnalysis&version=2026.8.2.1212
cCoder.CodeAnalysis
cCoder.CodeAnalysis analyses C# projects against the architectural and coding conventions defined by The Standard. It reports findings through normal compiler diagnostics and produces a portable architecture document for tooling and visualisation.
Installation
Add one package reference to each project that should be analysed:
<PackageReference Include="cCoder.CodeAnalysis" Version="2026.7.22.0000" />
No separate analyzer or build-task package is required. Building the project activates the compiler analyzer and, for non-test projects, generates project.stxjson beside the project file.
The package currently requires the .NET 10 SDK for its build integration.
Build behaviour
During a normal build the package:
- Analyses the Roslyn compilation.
- Emits each analysis item as an
STXcompiler diagnostic, making it visible in build output and the Visual Studio Error List. - Generates
project.stxjsonafter a successful non-test build. - Avoids rewriting an unchanged architecture document.
Projects with IsTestProject set to true are still analysed, but do not produce an architecture document.
Generation can be disabled or redirected when required:
<PropertyGroup>
<cCoderCodeAnalysisGenerateArchitecture>false</cCoderCodeAnalysisGenerateArchitecture>
<cCoderCodeAnalysisArchitecturePath>$(MSBuildProjectDirectory)\architecture\project.stxjson</cCoderCodeAnalysisArchitecturePath>
</PropertyGroup>
Architecture document
The generated document contains:
- Classes and their Standard element types.
- Properties, methods, inputs, and fully qualified type names.
- Directed links between internal types.
- Analysis items including rule code, description, type, and source line.
Enum values are serialized as readable strings. Source paths are relative to the project containing project.stxjson, allowing the document to be moved with the project and consumed directly by Visual Studio or browser-based diagramming tools.
Standard element types
The model recognises the principal layers used by The Standard, including:
- Brokers and dependencies
- Foundation services
- Processing services
- Orchestration services
- Coordination services
- Management services
- Aggregation services
- Exposures and controllers
- Models
- Tests
Rules cover architectural dependencies, public contracts, exception handling, validation, naming, asynchronous operations, controller behaviour, test structure, source layout, and formatting.
Runtime use
The architecture builder can also be resolved through dependency injection when analysis is needed programmatically:
ServiceCollection services = new ServiceCollection();
services.AddCodeAnalysis();
using ServiceProvider serviceProvider = services.BuildServiceProvider();
IArchitectureBuilder architectureBuilder = serviceProvider
.GetRequiredService<IArchitectureBuilder>();
Architecture architecture = architectureBuilder.Generate(
path: projectPath);
Building the repository
dotnet restore src/cCoder.CodeAnalysis.slnx
dotnet build src/cCoder.CodeAnalysis.slnx -c Release --no-restore
dotnet test src/cCoder.CodeAnalysis.Tests/cCoder.CodeAnalysis.Tests.csproj -c Release --no-build
dotnet test src/cCoder.CodeAnalysis.Sample.Tests/cCoder.CodeAnalysis.Sample.Tests.csproj -c Release --no-build
dotnet pack src/cCoder.CodeAnalysis/cCoder.CodeAnalysis.csproj -c Release --no-restore
The sample projects provide known valid and deliberately invalid code used to verify every analysis rule. Deliberate rule violations are expected to appear as compiler warnings during repository builds.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.CSharp (>= 5.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- System.Text.Json (>= 10.0.0)
-
net10.0
- Microsoft.CodeAnalysis.CSharp (>= 5.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
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 |
|---|---|---|
| 2026.8.27.1637 | 151 | 8/27/2026 |
| 2026.8.27.1622 | 82 | 8/27/2026 |
| 2026.8.26.2138 | 287 | 8/26/2026 |
| 2026.8.26.2102 | 122 | 8/26/2026 |
| 2026.8.26.1209 | 98 | 8/26/2026 |
| 2026.8.24.1203 | 102 | 8/24/2026 |
| 2026.8.22.2017 | 94 | 8/22/2026 |
| 2026.8.10.1538 | 722 | 8/10/2026 |
| 2026.8.10.1517 | 634 | 8/10/2026 |
| 2026.8.10.1010 | 98 | 8/10/2026 |
| 2026.8.5.1337 | 108 | 8/5/2026 |
| 2026.8.4.2107 | 595 | 8/4/2026 |
| 2026.8.3.1743 | 1,795 | 8/3/2026 |
| 2026.8.3.1611 | 376 | 8/3/2026 |
| 2026.8.2.1256 | 366 | 8/2/2026 |
| 2026.8.2.1212 | 114 | 8/2/2026 |
| 2026.8.1.1857 | 440 | 8/1/2026 |
| 2026.8.1.1820 | 160 | 8/1/2026 |
| 2026.8.1.1720 | 112 | 8/1/2026 |
| 2026.8.1.1532 | 227 | 8/1/2026 |