WixDocument CreateWixDocument(string fileName) { WixDocument doc = new WixDocument(); doc.Load(fileReader.Create(fileName)); doc.FileName = fileName; return(doc); }
void ReadBinariesFromDocument(string fileName) { try { WixDocument document = new WixDocument(project); document.Load(textFileReader.Create(fileName)); document.FileName = fileName; foreach (WixBinaryElement element in document.GetBinaries()) { if (!binaries.ContainsKey(element.Id)) { binaries.Add(element.Id, element.GetFileName()); } } } catch (FileNotFoundException) { } catch (XmlException) { } }