private void WritePartsInfo(ZipArchive zout) { if (partsinfo.Parts.Count() <= 0) { return; } partsinfo.Version = mplabXVersion; var xdoc = new XDocument(new XDeclaration("1.0", "utf-8", "yes")); xdoc.Add(partsinfo.ToXElement()); ZipArchiveEntry partsentry = zout.CreateEntry(PartsinfoFilename); using (var partw = new StreamWriter(partsentry.Open())) xdoc.Save(partw); }