Quick answer
Re-encode the manifest file as UTF-8 without BOM, or manually insert the missing whitespace between attributes in the XML.
What's happening here
You're seeing ERROR_SXS_XML_E_MISSINGWHITESPACE (0x000036D5) when Windows tries to load a side-by-side (SxS) assembly manifest. The SxS manifest parser, part of the Windows kernel-level activation context system, found two XML attributes smashed together with no space between them. The XML spec requires whitespace (space, tab, newline) between attributes. The parser stops dead and throws this error.
The real trigger? Most of the time it's an encoding corruption. A manifest file saved with UTF-16 BOM (Byte Order Mark) gets its whitespace bytes mangled — the BOM hides at the start, and the parser sees a character that isn't a valid space. But the root cause is almost always a tool that saved the manifest with the wrong encoding. I've also seen this from copy-pasting manifest content from a web page where HTML entities replaced spaces with non-breaking spaces (U+00A0).
Fix steps
- Locate the manifest file. Look for
app.manifestor a file likeyourapp.exe.manifestin the same folder as the failing executable. If it's a system-level assembly, checkC:\Windows\WinSxS\Manifests\— but be careful, messing with those can break Windows. - Identify the encoding. Open the file in Notepad++. Look at the bottom-right corner. If it says
UCS-2 LE BOMorUTF-16 LE BOM, that's your problem. A hex dump will showFF FEat byte 0. - Re-encode to UTF-8 without BOM. In Notepad++, go to Encoding menu > Convert to UTF-8 without BOM. Save the file. This fixes the mangled whitespace issue because the UTF-16 BOM can confuse the SxS parser's whitespace detection.
- If the error persists, manually check for whitespace. Search for patterns like
attribute1=\"value1\"attribute2=\"value2\". Insert a space between\"andattribute2. The parser literally expects a space character (0x20) there. - Rebuild the manifest from scratch. If neither works, delete the manifest and regenerate it. Use Visual Studio's mt.exe:
mt.exe -manifest your.dll.manifest -outputresource:your.dll;#1. The tool generates proper whitespace.
Alternatives if the main fix fails
Try a different editor. Notepad might have inserted its own BOM. Use VS Code with the Hex Editor extension. Check if any non-ASCII whitespace characters (U+00A0, U+200B) are present. Replace them with regular spaces (U+0020).
Check for hidden characters in attribute values. The error message says "missing whitespace" but the problem could be an extra character that broke the parser. Run this PowerShell snippet to inspect the raw bytes:
Get-Content app.manifest -Encoding Byte | Format-Hex
Look for FF FE at the start (UTF-16 BOM) or any byte > 0x7F in the attribute area. Replace those with plain ASCII spaces.
If the manifest came from a system assembly, you might have a corrupted Windows component. Run sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth to restore the original manifest.
Prevention tip
Always save manifest files as UTF-8 without BOM. If you're using Visual Studio, check the project properties: under Application > Manifest, make sure it's set to "Create application without a manifest" and embed the manifest via a resource file. That way the compiler handles encoding correctly. Never copy-paste manifest XML from a web page into a text editor — the whitespace gets mangled every time.