| Previous | Next |
| WCM_E_ASSERTIONFAILED | WCM_E_INVALIDKEY |
WCM_E_DUPLICATENAME
WCM_E_DUPLICATENAME is the failure HRESULT 0x8022001B (signed decimal -2145255397, unsigned decimal 2149711899). Its severity bit is 1, facility is 34 (FACILITY_STATE_MANAGEMENT), and the facility-specific code field is 0x001B.
AllStat records the Windows SDK description as “Name already exists.”
Interpretation without overreach
A name collides within an SMI scope. The operation reached insertion or compilation of named settings, expressions, substitutions, handlers, or list elements. The first branch to test is whether two merged manifests declare the same symbol; keep that separate from the possibility that case or normalization differences collapse to one name.
SMI object or metadata boundary
At this boundary, capture duplicate text and enclosing scope, then correlate it with source locations of every declaration. Assign ownership only after checking normalization/case behavior used by SMI.
Common origins
- two merged manifests declare the same symbol
- case or normalization differences collapse to one name
- a create operation repeats an existing child name
- generated metadata emits both base and override definitions into one scope
Useful artifacts
- duplicate text and enclosing scope
- source locations of every declaration
- normalization/case behavior used by SMI
- merge or generation order
- whether the objects are semantically identical or conflicting
How to isolate the defect
- retain one authoritative declaration
- rename only when references and compatibility are updated together
- prevent duplicate emission in the generator
- enumerate existing children before creating dynamic entries
- validate the merged artifact for uniqueness
When another attempt is justified
A retry without removing or renaming the collision is deterministic. Do not delete an arbitrary existing object before comparing ownership.
Related result codes
WCM_E_NAMESPACEALREADYREGISTERED is an identity collision at store registration. DUPLICATENAME is a local naming conflict inside metadata or a settings collection.
Example from an offline image
Two feature fragments each generate the same handler name into a shared namespace. Compilation sees both declarations in one scope.
Developer and administrator notes
For operational telemetry, retain normalization/case behavior used by SMI; also record merge or generation order. Preserve a redacted summary of whether the objects are semantically identical or conflicting; use a cryptographic hash when that evidence is a file, stream, or generated artifact.
Establish the collision scope
The same text can be legal in different namespaces or collections. Record the enclosing element and namespace identity so remediation does not rename an unrelated object.
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.