| Previous | Next |
| E_ILLEGAL_METHOD_CALL | RO_E_METADATA_NAME_IS_NAMESPACE |
RO_E_METADATA_NAME_NOT_FOUND
Windows Runtime type or namespace was not found in metadata
RO_E_METADATA_NAME_NOT_FOUND is HRESULT 2147483663 (0x8000000F) from winerror.h. AllStat describes it as “Typename or Namespace was not found in metadata file.” In the Windows Runtime metadata, object lifetime, asynchronous operation, activation, and apartment model, the code identifies a specific failure boundary and should not be replaced by a generic COM exception.
Handling RO_E_METADATA_NAME_NOT_FOUND correctly requires the code-specific postcondition, not merely the fact that FAILED(hr) is true.
Diagnostic sequence
- Capture the raw unsigned value
0x8000000Fand symbolic nameRO_E_METADATA_NAME_NOT_FOUNDbefore a language projection, exception wrapper, or generic COM helper replaces it. - Identify the exact interface, method, callback, activation request, metadata query, access-control operation, or marshaling boundary that returned
RO_E_METADATA_NAME_NOT_FOUND. - Reconstruct the operation timeline for
RO_E_METADATA_NAME_NOT_FOUND, including object creation, thread or apartment initialization, security setup, callbacks, mutations, shutdown, and cleanup. - Prove the decisive condition: the spelling, namespace qualification, architecture, package version, and metadata search path match the component being activated or reflected.
- Inspect every output parameter, handle, interface pointer, token, SID, ACL, stream, buffer, server-side object, or asynchronous result produced before
RO_E_METADATA_NAME_NOT_FOUND. - Reproduce
RO_E_METADATA_NAME_NOT_FOUNDwith the smallest safe input, change only the suspected precondition, and verify that both the HRESULT and postcondition change as predicted.
Where it is encountered
RO_E_METADATA_NAME_NOT_FOUNDcan be returned during C++/WinRT, WRL, .NET projections, or native WinRT ABI calls. ForRO_E_METADATA_NAME_NOT_FOUND, record the interface, method, component version, thread, apartment, process, and correlation ID.RO_E_METADATA_NAME_NOT_FOUNDcan be returned during runtime-class activation, WinMD reflection, asynchronous objects, observable state, or view lifecycle. ForRO_E_METADATA_NAME_NOT_FOUND, record the interface, method, component version, thread, apartment, process, and correlation ID.RO_E_METADATA_NAME_NOT_FOUNDcan be returned during cross-thread and cross-apartment handoff between UI, ASTA, STA, MTA, broker, and background work. ForRO_E_METADATA_NAME_NOT_FOUND, record the interface, method, component version, thread, apartment, process, and correlation ID.
The immediate focus for RO_E_METADATA_NAME_NOT_FOUND is WinRT metadata lookup for a fully qualified name that is absent from the loaded WinMD set or package dependency graph. Keep RO_E_METADATA_NAME_NOT_FOUND attached to that operation; the same numeric severity outside the owning API does not supply enough context.
Decisive interpretation boundary
Before choosing recovery, verify that the spelling, namespace qualification, architecture, package version, and metadata search path match the component being activated or reflected. If this condition cannot be proven for RO_E_METADATA_NAME_NOT_FOUND, stop before consuming outputs or repeating side effects.
For RO_E_METADATA_NAME_NOT_FOUND, also confirm that all observed objects, tokens, buffers, proxies, metadata files, or ACLs belong to the current operation generation and were not retained from an earlier attempt.
Evidence and telemetry
- Preserve requested fully qualified name for
RO_E_METADATA_NAME_NOT_FOUND. - Preserve WinMD files and package versions searched for
RO_E_METADATA_NAME_NOT_FOUND. - Preserve process architecture for
RO_E_METADATA_NAME_NOT_FOUND. - Preserve package dependency graph for
RO_E_METADATA_NAME_NOT_FOUND. - Preserve activation or reflection API for
RO_E_METADATA_NAME_NOT_FOUND.
For RO_E_METADATA_NAME_NOT_FOUND, also record UTC time, process and thread IDs, apartment type, component version, security or package identity where relevant, and a correlation ID. For RO_E_METADATA_NAME_NOT_FOUND, use hashes, lengths, GUIDs, and SID strings rather than logging confidential payloads or credentials.
Difference from nearby HRESULTs
RO_E_METADATA_NAME_NOT_FOUND means no matching metadata symbol exists; RO_E_METADATA_NAME_IS_NAMESPACE means the supplied name exists but denotes a namespace.
Tests for RO_E_METADATA_NAME_NOT_FOUND should force both results and verify that object lifetime, output use, and user messaging differ.
Correct handling and recovery
Correct the type name or deploy the missing metadata dependency. Rebuild generated projections after metadata changes and avoid fallback to a similarly named type.
Repeat the operation after RO_E_METADATA_NAME_NOT_FOUND only when the documented precondition, identity, apartment, object generation, buffer, or configuration has changed.
Practical scenario
A plug-in host requests <code>Contoso.Imaging.Decoder</code>, but the installed package exposes versioned namespace <code>Contoso.Imaging.V2</code>. Deployment and generated bindings are aligned to the same WinMD.
A regression test should reproduce RO_E_METADATA_NAME_NOT_FOUND, assert the raw HRESULT and all relevant outputs, then correct only the decisive condition and verify the intended success or neighboring failure result.
Lifetime, retry, and cleanup rules
After RO_E_METADATA_NAME_NOT_FOUND, determine whether the current object, interface pointer, call context, token, stream, metadata reader, asynchronous operation, or access-control instance remains valid. For RO_E_METADATA_NAME_NOT_FOUND, release only resources owned by the failing attempt, cancel callbacks through their documented mechanism, and avoid double close, double commit, repeated activation, or replay of a non-idempotent remote method.
The retry policy for RO_E_METADATA_NAME_NOT_FOUND should state the trigger, maximum attempts, cancellation owner, and reconciliation step for effects that may have completed elsewhere.
Developer and administrator guidance
A support bundle for RO_E_METADATA_NAME_NOT_FOUND should include first-occurrence logs, interface and component identity, object generation, relevant policy, and safe hashes. For RO_E_METADATA_NAME_NOT_FOUND, redact credentials, tokens, private metadata, ACL identities, and serialized payload contents.
Document the owner of the RO_E_METADATA_NAME_NOT_FOUND boundary so future occurrences can be correlated across client, proxy, server, package, and security logs. Define who owns retry, cancellation, cleanup, policy changes, package repair, and user-facing messaging for RO_E_METADATA_NAME_NOT_FOUND.
References
- Microsoft: C++/WinRT error handling — official Microsoft documentation relevant to
RO_E_METADATA_NAME_NOT_FOUND. - Microsoft: concurrency and asynchronous operations — official Microsoft documentation relevant to
RO_E_METADATA_NAME_NOT_FOUND. - Microsoft: WinMD files — official Microsoft documentation relevant to
RO_E_METADATA_NAME_NOT_FOUND. - Microsoft: IAgileObject — official Microsoft documentation relevant to
RO_E_METADATA_NAME_NOT_FOUND. - Microsoft: COM apartments — official Microsoft documentation relevant to
RO_E_METADATA_NAME_NOT_FOUND. - Microsoft: HRESULT values — official Microsoft documentation relevant to
RO_E_METADATA_NAME_NOT_FOUND.
Looking for a different code? Search another status or error code.