/// <summary> /// Updates the Project Nodes for Later Versions. /// </summary> private void UpdateProjectFile() { _DeXml.XmlResolver = FileStreamXmlResolver.GetNullResolver(); _DeXml.Load(_projectFileWithPath); XmlElement root = GetRootNode(); const string xPath = "/Project/SolutionExplorer"; XmlNode searchNode = root.SelectSingleNode(xPath); if (searchNode == null) { const string filePath = "/Project/File"; XmlNodeList fileNode = root.SelectNodes(filePath); XmlNode newNode = _DeXml.CreateNode("element", "SolutionExplorer", ""); if (fileNode != null) { foreach (XmlNode item in fileNode) { newNode.AppendChild(item); } } root.AppendChild(newNode); _DeXml.Save(_projectFileWithPath); _DeXml.Load(_projectFileWithPath); } }
public void LoadProjectFile(string projFile) { ProjectFileWithPath = projFile; _DeXml.XmlResolver = FileStreamXmlResolver.GetNullResolver(); _DeXml.Load(projFile); }