/// <summary> /// Remove every file inside application directory. /// </summary> protected void ClearApplicationDirectory() { try { GRoggle.Write("Try to clear application directory", RoggleLogLevel.Debug); foreach (var file in ApplicationDirectory.EnumerateFiles()) { if (file.Name != ApplicationReleaseFileName) { GRoggle.Write($"Delete {file.Name}", RoggleLogLevel.Debug); file.Delete(); } } } catch (Exception e) { GRoggle.Write("Something goes wrong while clearing application directory", e); } }