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;
 }
 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}.");
 }
 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);
 }
 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);
 }