ERROR_SXS_XML_E_BADPEREFINSUBSET - 14059 (0x36EB)
Manifest Parse Error : Parameter entities cannot be used inside markup declarations in an internal subset.
Updated: Feb 21, 2026
Technical Background
The error code ERROR_SXS_XML_E_BADPEREFINSUBSET is a specific Windows API error that occurs during the parsing of XML manifests. This error indicates a problem with the structure or content of an XML manifest, specifically related to the use of parameter entities within markup declarations in an internal subset.
Error Details
The error ERROR_SXS_XML_E_BADPEREFINSUBSET is associated with the Windows Side-by-Side (SxS) assembly loader. The SxS loader uses manifests to manage and load assemblies, ensuring that applications can run correctly by resolving dependencies and versioning issues.
Manifest Parsing Context
Manifests are XML files used to describe the metadata of an assembly, including its identity, dependencies, and other attributes. During the loading process, the SxS loader parses these manifests to ensure they meet certain syntactic and semantic requirements. The error ERROR_SXS_XML_E_BADPEREFINSUBSET is triggered when a manifest contains invalid markup declarations within an internal subset that reference parameter entities.
Common Causes
The primary cause of this error is the improper use of parameter entities in XML manifests. Parameter entities are used to define named values or fragments that can be referenced throughout the document, but they cannot be used inside certain types of markup declarations in an internal subset. The specific context where this error occurs involves the SxS loader's validation process.
Real-World Context
This error typically arises when a developer or system administrator is working with custom manifests for assemblies that are being loaded by the SxS infrastructure. It can also occur if there are issues with third-party components or libraries that rely on incorrect manifest structures.
Is This Error Critical?
The criticality of this error depends on the context in which it occurs. If an application relies on a specific assembly and the SxS loader encounters ERROR_SXS_XML_E_BADPEREFINSUBSET, the application may fail to start or function correctly, leading to potential service disruptions.
How to Diagnose
Reviewing Operation Context
To diagnose this error, review the context in which the manifest is being used. Ensure that the manifest file is correctly formatted and does not contain invalid markup declarations within an internal subset.
Validating Parameters
Check the parameters passed to the SxS loader or any related functions to ensure they are valid and do not reference parameter entities incorrectly.
Confirming Object Types
Verify that the object types being manipulated (e.g., manifest files) are correctly identified and handled by the application or system.
Verifying Input Data
Ensure that all input data, including XML content, is free from syntax errors and adheres to the specified schema for manifests.
How to Resolve
Correct Parameter Usage
Correct any invalid parameter usage in manifest files. Ensure that parameter entities are used only where allowed by the XML schema and do not appear within markup declarations in an internal subset.
Adjust Operation Context
Adjust the operation context if necessary, ensuring that all operations involving manifests are performed correctly according to the SxS loader's requirements.
Restore Data
If data corruption is suspected, restore the manifest files from a known good backup or re-create them with correct syntax.
Retry Operation with Valid Inputs
Retry the operation using valid inputs and ensure that all parameters are correctly specified.
Developer Notes
Developers should be aware of the specific rules governing parameter entities in XML manifests, particularly when working with internal subsets. Adhering to these rules can prevent ERROR_SXS_XML_E_BADPEREFINSUBSET from occurring.
Related Errors
ERROR_SXS_FILE_HASH_MISMATCH: Occurs when there is a mismatch between the expected and actual hash values of an assembly.ERROR_SXS_MANIFEST_IDENTITY_Mismatch: Indicates that the manifest identity does not match the expected value.
FAQ
Q: What causes ERROR_SXS_XML_E_BADPEREFINSUBSET?
A: This error is caused by improper use of parameter entities in XML manifests, specifically within markup declarations in an internal subset.
Q: How can I prevent this error from occurring?
A: Ensure that all manifest files are correctly formatted and adhere to the rules governing parameter entity usage. Validate parameters and input data thoroughly before loading assemblies with the SxS loader.
Summary
ERROR_SXS_XML_E_BADPEREFINSUBSET is a specific Windows API error related to XML manifest parsing, indicating improper use of parameter entities in an internal subset. Developers should be cautious when working with manifests and ensure that all parameters are correctly specified to avoid this error.