| Previous | Next |
| WCM_E_MANIFESTCOMPILATIONFAILED | WCM_E_MIXTYPEASSERTION |
WCM_E_CYCLICREFERENCE
WCM_E_CYCLICREFERENCE is the failure HRESULT 0x80220023 (signed decimal -2145255389, unsigned decimal 2149711907). Its severity bit is 1, facility is 34 (FACILITY_STATE_MANAGEMENT), and the facility-specific code field is 0x0023.
AllStat records the Windows SDK description as “Cyclic reference detected.”
Exact meaning and contract boundary
The metadata reference graph contains a cycle. The operation reached resolution of expressions, substitutions, settings dependencies, or metadata references during compilation/validation. The first branch to test is whether expression A references B while B references A; keep that separate from the possibility that substitutions expand recursively.
Where the result appears
At this boundary, capture the reference chain reported near the failure, then correlate it with all definitions and source files participating in the cycle. Assign ownership only after checking merge/include order.
Likely cause branches
- expression A references B while B references A
- substitutions expand recursively
- settings dependencies form a longer loop across merged manifests
- a type or metadata include graph returns to an already active node
Evidence that resolves the ambiguity
- the reference chain reported near the failure
- all definitions and source files participating in the cycle
- merge/include order
- a graph of symbol dependencies
- the shortest cycle obtained by removing unrelated metadata
Diagnostic sequence
- construct a dependency graph from authoritative sources
- break the cycle by introducing a concrete base value or one-way dependency
- avoid fixing only the final edge without checking indirect references
- recompile the reduced graph
- add cycle detection to manifest generation tests
Retry and recovery
Retry only after changing the reference graph. Evaluation order cannot make a true cycle safe.
Difference from nearby WCM results
WCM_E_CONFLICTINGASSERTION describes incompatible rules without requiring a reference loop. CYCLICREFERENCE specifically identifies recursive dependency.
Practical scenario
Two substitutions each expand to text containing the other substitution. Neither can be resolved to a terminal value.
Logging and engineering guidance
For operational telemetry, retain merge/include order; also record a graph of symbol dependencies. Preserve a redacted summary of the shortest cycle obtained by removing unrelated metadata; use a cryptographic hash when that evidence is a file, stream, or generated artifact.
Verify the shortest loop
A long manifest can hide a small cycle. Report the minimal closed chain of symbols or settings; unrelated dependency edges only make the correction harder to review.
Official Microsoft references.
- Microsoft: SMI error and success constants.
- Microsoft: Settings Management Infrastructure API.
- Microsoft: SMI interfaces.
- Microsoft: ISettingsContext::Deserialize.
- Microsoft: ISettingsResult::GetLine.
Looking for a different code? Search another status or error code.