Skip to content

Diagnostic rules

CaeriusNet analyzers validate [GenerateDto], [GenerateTvp], and AutoContracts manifest inputs at compile time. Diagnostics are emitted by the analyzer included with the CaeriusNet package and appear in IDE builds and dotnet build.

Use these pages as the rule reference for generated DTO, TVP mapper, and AutoContracts manifest issues.

IDSeveritySummary
CAERIUS001ErrorType must be sealed
CAERIUS002ErrorType must be partial
CAERIUS003ErrorType must declare a primary constructor
CAERIUS004ErrorTvpName must not be empty
CAERIUS005WarningUnmapped CLR type falls back to sql_variant
CAERIUS006ErrorGenerator target shape is not supported
CAERIUS200ErrorAutoContracts manifest is missing
CAERIUS201ErrorStored procedure could not be found
CAERIUS202ErrorReferenced TVP type is missing
CAERIUS203ErrorTVP SQL type is not supported
CAERIUS204ErrorFirst projection cannot be determined
CAERIUS205WarningStored procedure has no result set
CAERIUS206ErrorOUTPUT parameters are not supported
CAERIUS207ErrorSQL type cannot be mapped
CAERIUS208Policy-dependentNullable column violates policy
CAERIUS209ErrorContract hash differs during Verify
CAERIUS210WarningStored procedure is probably incompatible

Build policy

Keep error diagnostics fixed in source. Treat warning suppressions as design decisions and prefer documenting them near the affected type or AutoContracts manifest entry.

See also the higher-level Compiler Diagnostics guide for suppression and severity configuration.

Released under the MIT License.