void RunInstallScript(PackageOperationEventArgs e)
        {
            IPackageScript script = scriptFactory.CreatePackageInstallScript(e.Package, e.InstallPath);

            RunScript(script);
        }
        void RunUninstallScript(IPackageManagementProject project, PackageOperationEventArgs e)
        {
            IPackageScript script = scriptFactory.CreatePackageUninstallScript(e.Package, e.InstallPath);

            RunScript(project, script);
        }
 void PackageReferenceAdded(object sender, PackageOperationEventArgs e)
 {
     packageManager.InstallPackageIntoSolutionRepository(e.Package);
 }
Пример #4
0
 public void Package_Installing(object sender, PackageOperationEventArgs e)
 {
     downloadDialog.SetProgressBarPercent(100);
     downloadDialog.Show("Installing " + e.Package);
 }
 void PackageReferenceAdded(IPackageManagementProject project, PackageOperationEventArgs e)
 {
     RunInstallScript(project, e);
 }
Пример #6
0
 private void OnPackageInstalled(object sender, PackageOperationEventArgs e)
 {
     AddToolsFolderToEnvironmentPath(e.InstallPath);
     ExecuteScript(e.InstallPath, PowerShellScripts.Init, e.Package, null);
 }
 private void OnPackageInstalled(object sender, PackageOperationEventArgs e)
 {
     AddToolsFolderToEnvironmentPath(e.InstallPath);
     ExecuteScript(e.InstallPath, PowerShellScripts.Init, e.Package, targetFramework: null, project: null);
     PrepareOpenReadMeFile(e);
 }
Пример #8
0
 private void OnPackageInstalled(object sender, PackageOperationEventArgs e)
 {
     _providerServices.ScriptExecutor.ExecuteInitScript(e.InstallPath, e.Package, this);
     PrepareOpenReadMeFile(e);
 }
 public void FirePackageUninstalled(PackageOperationEventArgs e)
 {
     PackageUninstalled(this, e);
 }
Пример #10
0
 void PackageReferenceAdded(object sender, PackageOperationEventArgs e)
 {
     packagesUpdated = true;
 }
Пример #11
0
 public void FirePackageReferenceRemoved(PackageOperationEventArgs eventArgs)
 {
     OnPackageReferenceRemoved(eventArgs);
 }
 private void PackageManager_PackageInstalled(object sender, PackageOperationEventArgs e)
 {
     Console.WriteLine($" * NuGet: Package {e.Package.GetFullName()} installed to {e.InstallPath}.");
 }
Пример #13
0
 private void PackageManager_PackageInstalled(object sender, PackageOperationEventArgs args)
 {
     Console.WriteLine($"DEPS: Installed! {args.Package.Title} {args.Package.Version.Version} ");
 }
Пример #14
0
 private void PackageInstalling(object sender, PackageOperationEventArgs e)
 {
     _downloadDialog.SetProgressBarPercent(100);
     _downloadDialog.Show(string.Format(Resources.Installing, e.Package));
 }
Пример #15
0
        private void PackageInstalled(object sender, PackageOperationEventArgs eventArgs)
        {
            List <IPackageAssemblyReference> assemblyReferences = GetCompatibleItems(TargetFramework, eventArgs.Package.AssemblyReferences).ToList();
            var skipFiles = new List <string>();

            foreach (var f in assemblyReferences)
            {
                var source   = System.IO.Path.Combine(eventArgs.InstallPath, f.Path);
                var filename = System.IO.Path.GetFileName(source);
                skipFiles.Add(filename);
                var target = System.IO.Path.Combine(InstallPath, filename);
                if (!System.IO.File.Exists(source))
                {
                    eventArgs.Package.ExtractContents(FileSystem, eventArgs.InstallPath);
                    System.Diagnostics.Debug.WriteLine("Where is " + source);
                }
                CopyIfNewer(source, target);
            }
            foreach (var f in eventArgs.Package.GetLibFiles())
            {
                var source   = System.IO.Path.Combine(eventArgs.InstallPath, f.Path);
                var filename = System.IO.Path.GetFileName(source);
                if (skipFiles.Contains(filename))
                {
                    continue;
                }
                var target = System.IO.Path.Combine(InstallPath, filename);
                if (!System.IO.File.Exists(source))
                {
                    eventArgs.Package.ExtractContents(FileSystem, eventArgs.InstallPath);
                    System.Diagnostics.Debug.WriteLine("Where is " + source);
                }
                CopyIfNewer(source, target);
            }
            foreach (var f in eventArgs.Package.GetContentFiles())
            {
                var source   = System.IO.Path.Combine(eventArgs.InstallPath, f.Path);
                var filename = System.IO.Path.GetFileName(source);
                if (skipFiles.Contains(filename))
                {
                    continue;
                }
                var target = System.IO.Path.Combine(InstallPath, filename);
                if (!System.IO.File.Exists(source))
                {
                    eventArgs.Package.ExtractContents(FileSystem, eventArgs.InstallPath);
                    System.Diagnostics.Debug.WriteLine("Where is " + source);
                }
                CopyIfNewer(source, target);
            }

            if (System.IO.Directory.Exists(eventArgs.InstallPath + @"\build"))
            {
                if (System.IO.Directory.Exists(eventArgs.InstallPath + @"\build\x64"))
                {
                    foreach (var f in System.IO.Directory.GetFiles(eventArgs.InstallPath + @"\build\x64"))
                    {
                        var filename = System.IO.Path.GetFileName(f);
                        var target   = System.IO.Path.Combine(InstallPath, filename);
                        CopyIfNewer(f, target);
                    }
                }
            }
        }
Пример #16
0
 private static void HandlePackageInstalled(object sender, PackageOperationEventArgs e)
 {
     Console.WriteLine("Installed package: {0}", e.Package.GetFullName());
 }
 void PackageReferenceRemoved(object sender, PackageOperationEventArgs e)
 {
     packagesRemoved.Add(e.Package);
 }
Пример #18
0
 void FirePackageInstalledEvent(IPackageManagementProject project, PackageOperationEventArgs eventArgs)
 {
     project.Raise(p => p.PackageInstalled += null, null, eventArgs);
 }
 private void OnPackageInstalling(object sender, PackageOperationEventArgs e)
 {
     // Write disclaimer text before a package is installed
     WriteDisclaimerText(e.Package);
 }
Пример #20
0
 void FirePackageReferenceRemovedEvent(IPackageManagementProject project, PackageOperationEventArgs eventArgs)
 {
     project.Raise(p => p.PackageReferenceRemoved += null, null, eventArgs);
 }
 protected virtual void InstallPackage(object sender, PackageOperationEventArgs e)
 {
     ProcessItems(e.InstallPath);
     ProcessFiles(e.InstallPath);
 }
 void PackageInstalled(object sender, PackageOperationEventArgs e)
 {
     RunInitScript(e);
 }
 void PackageInstalled(IPackageManagementProject project, PackageOperationEventArgs e)
 {
     RunInitScript(project, e);
 }
 void PackageReferenceRemoved(object sender, PackageOperationEventArgs e)
 {
     RunUninstallScript(e);
 }
 void PackageReferenceRemoving(IPackageManagementProject project, PackageOperationEventArgs e)
 {
     RunUninstallScript(project, e);
 }
 void PackageReferenceAdded(object sender, PackageOperationEventArgs e)
 {
     RunInstallScript(e);
 }
Пример #27
0
 void manager_PackageInstalling(object sender, PackageOperationEventArgs e)
 {
     Log.LogMessage(MessageImportance.High, "Installing {0} {1} ...", e.Package.Id, e.Package.Version);
 }
Пример #28
0
 private void PackageUninstalling(object sender, PackageOperationEventArgs e)
 {
     CloseProcessesInPath(DisplayMessage, e.Id, e.InstallPath);
 }