Windows 8/8.1 Store apps don't have app.configs or an equivalent. A common workaround is an embedded XML file that gets read using something similar to:
private static string LoadSetting(string settingKey)
{
var assembly = typeof(AppConfig).GetTypeInfo().Assembly;
using (var stream = assembly.GetManifestResourceStream("ABC.ConfigSettings.xml"))
{
var xmlDoc = XDocument.Load(stream);
var appSettings = xmlDoc.Element("appSettings");
var node = appSettings.Elements().Single(e => (string)e.Attribute("key") == settingKey);
return (string)node.Attribute("value");
}
}
It would be great if we could point ConfigInjector at an arbitrary embedded resource or string containing the properly formed XML.
Windows 8/8.1 Store apps don't have app.configs or an equivalent. A common workaround is an embedded XML file that gets read using something similar to:
It would be great if we could point ConfigInjector at an arbitrary embedded resource or string containing the properly formed XML.