static async void Installed(object sender, InstallEventArgs e) { var project = ProjectHelpers.GetActiveProject(); foreach (var file in e.Package.Files) { string absolute = Path.Combine(e.Path, file); try { var info = new FileInfo(absolute); await project.AddFileToProjectAsync(info.FullName); } catch (Exception ex) { Logger.Log(ex); } } string msg = $"Installed package {e.Package.Name} {e.Package.Version} successfully"; Logger.Log(msg + Environment.NewLine); VSPackage.DTE.StatusBar.Text = msg; }
static void Installing(object sender, InstallEventArgs e) { string msg = $"Installing {e.Package.Name} {e.Package.Version}..."; Logger.Log(msg); VSPackage.DTE.StatusBar.Text = msg; }
static void Downloading(object sender, InstallEventArgs e) { string file = e.Package.AllFiles.Count() == 1 ? "file" : "files"; Logger.Log($"Downloading {e.Package.Name} {e.Package.Version} ({e.Package.Files.Count()} {file})"); }
static void DownloadingRemainingFiles(object sender, InstallEventArgs e) { int count = e.Package.AllFiles.Count() - e.Package.Files.Count(); string file = count == 1 ? "file" : "files"; Logger.Log($"Downloading remaining {e.Package.Name} {e.Package.Version} ({count} {file})"); }
static void Installed(object sender, InstallEventArgs e) { string msg = $"Installed {e.Package.Name} successfully"; Logger.Log(msg); VSPackage.DTE.StatusBar.Text = msg; }
static void Downloaded(object sender, InstallEventArgs e) { Logger.Log($" Downloaded {e.Package.Name} {e.Package.Version} successfully"); }