-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClickOnce: improve application manifest file detection #773
base: main
Are you sure you want to change the base?
Conversation
…e 0/1 files with a .manifest extension
…correctly parsed so that the existing tests pass
// there should only be a single result here, if the file is a valid clickonce manifest. | ||
XmlNodeList dependentAssemblies = xmlDoc.GetElementsByTagName("dependentAssembly"); | ||
if (dependentAssemblies.Count != 1) | ||
{ | ||
Logger.LogDebug(Resources.ApplicationManifestNotFound); | ||
return false; | ||
} | ||
|
||
XmlNode? node = dependentAssemblies.Item(0); | ||
if (node is null || node.Attributes is null) | ||
{ | ||
Logger.LogDebug(Resources.ApplicationManifestNotFound); | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a bug here. The comment asserts that there should only be one dependentAssembly element. However, it seems that there can be multiple.
The
dependency
element is required. It has no attributes. A deployment manifest can have multipledependency
elements.
This means this change would break users with multiple dependency
elements. This method needs smarter application manifest identification.
{ | ||
internal interface IXmlDocumentLoader | ||
{ | ||
XmlDocument Load(FileInfo file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why you picked XmlDocument
instead of XDocument
here.
Resolve #681
This PR replaces #758.
CC @clairernovotny, @javierdlg, @jackmtpt