private void InitSettings() { FileInfo file = new FileInfo(Path.Combine(SPUtility.GetGenericSetupPath(@"CONFIG\MyExample"), "app1.config")); if (file.Exists == false) { throw new FileNotFoundException("No config file", "app1.config"); } settings = (from KeyValueConfigurationElement appSetting in file.AppSettings() select appSetting) .ToDictionary(kvce => kvce.Key, kvce => new Setting { Key = kvce.Key, Value = kvce.Value }); }