private bool DoUpdate(IApplicationDeployment ad) { try { // _log.Debug("Running preliminary operations"); OnUpdating(); // _log.Debug("Running update"); bool ret = ad.Update(); // _log.Debug("Running finalizing operations"); OnUpdated(); return(ret); } catch (DeploymentDownloadException dde) { // _log.Error("The new deployment could not be downloaded from its location on the network.", dde); OnError(dde); return(false); } catch (InvalidDeploymentException idex) { // _log.Error("Your ClickOnce deployment is corrupted.", idex); OnError(idex); return(false); } catch (InvalidOperationException ioex) { // _log.Error("The application is currently being updated.", ioex); OnError(ioex); return(false); } catch (TrustNotGrantedException tngex) { //_log.Error( // "The local computer did not grant the application the permission level it requested to execute.", // tngex); OnError(tngex); return(false); } }