---
title: ARC0031 - Command key properties are read through reflection
editUrl: https://github.com/Cratis/Arc/edit/main/Documentation/backend/csharp/code-analysis/ARC0031.md
description: A command that generated code cannot name has its key properties read through reflection by read protection.
lastUpdated: 2026-10-19T00:00:00.000Z
---


<!-- Copyright (c) Cratis. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->

## Generate the key properties or accept reflection

The model-graph generator reports this informational diagnostic when the compilation references Chronicle's command key registry and a command, or a type validated by a `CommandValidator<T>`, cannot be named from generated code. Partial types, types with a base type from another assembly, private or file-local types, generic definitions, and properties with obsolete, experimental, or trim-annotated getters or inaccessible types can prevent generation.

For such a command, read protection reads the public properties it needs through reflection. Behavior is unchanged, and reflection is compatible with JIT execution. It is not trimming or NativeAOT safe.

This diagnostic does not fail the build. To remove it, make the command a non-partial, accessible type declared in your project, or accept the reflection fallback.
