/// <summary> /// Remove the immediate ClickOnce ancestor app from the very first Squirrel descendant app. /// </summary> /// <returns></returns> public static async Task TryRemoveClickOnceAncestor() { try { var migrator = new InSquirrelAppMigrator("BigStash for Windows"); await migrator.Execute(); } catch (Exception e) { if (e is InvalidOperationException) { var ioe = (InvalidOperationException)e; if (ioe.Message == "Sequence contains no matching element") { // no clickonce installation found to remove, simply return. return; } } else { throw; } } }
public async Task InSquirrelAppMigratorUninstallsClickOnceApp() { using (IntegrationTestHelper.WithClickOnceApp()) { var migrator = new InSquirrelAppMigrator(IntegrationTestHelper.ClickOnceAppName); await migrator.Execute(); var installInfo = UninstallInfo.Find(IntegrationTestHelper.ClickOnceAppName); Assert.Null(installInfo); } }