0X000036EF

0X000036EF: SXS XML Unclosed Comment in Manifest

Server & Cloud Beginner 👁 5 views 📅 May 26, 2026

An XML comment in a side-by-side manifest wasn't closed. Usually a botched edit or copy-paste. Fix is simple: find and close the <!-- -->.

1. Unclosed XML Comment in a Manifest File

What's actually happening here is the Windows Side-by-Side (SxS) loader is parsing an application manifest or assembly manifest and hits an XML comment that starts with <!-- but never ends with -->. The parser chokes, throws ERROR_SXS_XML_E_UNCLOSEDCOMMENT (0X000036EF), and the app won't start.

This happens most often when someone edits a manifest manually — maybe to add a dependency, change a version, or disable a visual style — and accidentally deletes the closing --> or adds a stray line break. I've seen it after copy-pasting snippets from a web browser that converted --> into an em-dash or something. Real-world trigger: editing app.manifest in Notepad on Windows 10 22H2, saving it, then the app crashes on launch with this error.

How to fix it

  1. Open the manifest file that's failing. If you don't know which one, look at the app's installation folder — it's usually app.exe.manifest or app.manifest. For system assemblies, check C:\Windows\WinSxS\Manifests\.
  2. Search for <!--. Every occurrence must have a matching --> later.
  3. If you find an unclosed comment, close it properly. A comment looks like this:
    <!-- This is a valid comment -->
  4. If the comment is malformed (e.g., <!-- broken comment with no closing), fix it by adding --> at the end, or delete the whole comment line if it's not needed.
  5. Save the file, restart the app.

That's the fix for 90% of cases. Don't overthink it.

2. Corrupted Manifest File (Binary or Encoding Issues)

Sometimes the file looks fine in a text editor but the bytes are wrong. What you're seeing as --> might be a UTF-16 BOM or a null byte that breaks the parser. This happens if you edited the file with a tool that saves in UTF-16 with BOM (like old Windows Notepad in some versions) but the SxS loader expects UTF-8. The parser reads a byte that's not - and fails to close the comment.

How to fix it

  1. Open the manifest in a hex editor or in Notepad++ and check the encoding. It should be UTF-8 without BOM.
  2. Re-save it as UTF-8 without BOM. In Notepad++, go to EncodingEncode in UTF-8 (don't pick UTF-8-BOM).
  3. If the file came from a zip or was reconstructed from a corrupted source, download a fresh copy.

I've fixed this for people who copied a manifest from a Linux server where line endings were LF instead of CRLF. Windows SxS doesn't care about line endings, but the encoding mismatch did. Save as plain UTF-8 and you're done.

3. Nested Comments or Malformed XML Structure

XML doesn't allow nested comments. If you have <!-- outer <!-- inner --> -->, the parser sees the first --> as closing the outer comment, then the remaining --> is a syntax error. The SxS parser reports it as unclosed comment because it gets confused about the nesting. This is rare but I've seen it in manifests generated by buggy build tools.

How to fix it

  1. Search for <!-- and count the number of opening vs closing comment tags. They should be equal.
  2. If you find more opens than closes, either remove the nested comment or flatten them into one comment.
  3. Example of bad:
    <!-- This comments out <!-- a nested comment --> but this part is orphaned -->
  4. Good fix:
    <!-- This comments out the nested comment entirely -->

Quick-reference summary

Cause What to check Fix
Unclosed comment Search for <!-- without matching --> Add --> or delete the comment
Corrupted encoding File saved as UTF-16 or UTF-8 with BOM Re-save as UTF-8 without BOM
Nested comments Multiple <!-- inside one comment Remove inner comment markers

If none of those fix it, run sxstrace.exe to get the exact manifest path. Open an admin command prompt, type sxstrace.exe Trace -logfile:sxs.etl, reproduce the error, then sxstrace.exe Parse -logfile:sxs.etl -outfile:sxs.txt. The output tells you exactly which file failed and at what line. That's the nuclear option, but it works every time.

Was this solution helpful?