-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
The attribute in the assembly node is misspelled - should be manifestVersion.
| XElement manifest = new XElement(ns + "assembly", new XAttribute("mainfestVersion", "1.0")); |
The Guid should be inserted with braces (i.e. new XAttribute("clsid", guid.ToString("B")))
| fileElement.Add(new XElement(ns + "comClass", new XAttribute("clsid", guid), new XAttribute("threadingModel", "Both"))); |
The manifest file is being written with a BOM. This must be removed as it will cause the Windows' SxS parser to consider the manifest invalid. The code could be updated as follows:
XDocument manifestDocument = new XDocument(new XDeclaration("1.0", "UTF-8", "yes"), manifest);
var settings = new XmlWriterSettings();
settings.Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
using (XmlWriter manifestWriter = XmlWriter.Create(comManifestPath, settings))
{
manifestDocument.WriteTo(manifestWriter);
}Metadata
Metadata
Assignees
Labels
No labels