using System; using System.IO; using System.Xml.Linq; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license namespace ProjectConverter.Platforms.Metro { public class AppxManifest { #region Private private string filepath; private ProjectPath project; #endregion #region Constructor public AppxManifest(ProjectPath setProject) { project = setProject; filepath = Path.Combine(project.FullSourceDirectoryPath, "Manifest.appxmanifest"); } #endregion #region AddNode public void AddNode(XElement itemGroup) { string namespaceName = itemGroup.Name.NamespaceName; XName appxManifestName = XName.Get("AppxManifest", namespaceName); XName subTypeName = XName.Get("SubType", namespaceName); XElement appManifestElement = new XElement(appxManifestName); appManifestElement.Add(new XAttribute("Include", "Manifest.appxmanifest")); appManifestElement.Add(new XElement(subTypeName, "Designer")); itemGroup.Add(appManifestElement); } #endregion #region Save public void Save() { string projectName = Path.GetFileNameWithoutExtension(project.FullSourcePath); // TODO: set name etc. File.WriteAllText(filepath, @" " + projectName + @" ANX Developer Team Assets\StoreLogo.png 6.2.0 6.2.0 "); } #endregion } }