///<summary>Creates a settings file for the active solution if one does not exist already, initialized from the current settings.</summary> public static void CreateSolutionSettings() { string path = GetSolutionFilePath(); if (File.Exists(path)) { return; } Save(path); ProjectHelpers.GetSolutionItemsProject().ProjectItems.AddFromFile(path); UpdateStatusBar("created"); }
private static void Migrate(bool solution) { var legacyPath = GetLegacyFilePath(); if (!File.Exists(legacyPath)) { return; } new SettingsMigrator(legacyPath).ApplyTo(WESettings.Instance); var jsonPath = solution ? GetSolutionFilePath() : GetUserFilePath(); Save(jsonPath); if (solution) { ProjectHelpers.GetSolutionItemsProject().ProjectItems.AddFromFile(jsonPath); } UpdateStatusBar("imported from legacy XML settings file"); Logger.Log("Migrated legacy XML settings file " + legacyPath + " to " + jsonPath); }