Commits

Andrew Nurse  committed a1ded0c

Added missing NuGet Packages.

  • Participants
  • Parent commits 84a882b

Comments (0)

Files changed (8)

File Packages/NuGet.Core.1.5.20902.9023/NuGet.Core.1.5.20902.9023.nupkg

Binary file added.

File Packages/NuGet.Core.1.5.20902.9023/lib/net40-Client/NuGet.Core.dll

Binary file added.

File Source/Installer/Packages/PS-Get.nupkg

Binary file modified.

File Source/Packages/PS-Get/Cmdlets/InstallPSPackageCommand.cs

 using System.Diagnostics;
 using System.Management.Automation;
 using NuGet;
-using PsGet.Utils;
 
 namespace PsGet.Cmdlets {
     [Cmdlet(VerbsLifecycle.Install, "PSPackage")]
             if (String.IsNullOrEmpty(Source)) {
                 Source = Settings.DefaultSource;
             }
-            
-            if(String.IsNullOrEmpty(Destination)) {
+
+            if (String.IsNullOrEmpty(Destination)) {
                 Destination = Settings.InstallationRoot;
             }
         }
             if (Version != null) {
                 idString += " " + Version.ToString();
             }
-            using (Operation op = StartOperation(String.Format("Installing {0}", idString))) {
-                PackageManager manager = CreatePackageManager(Source, Destination);
-                BindOperationToManager(op, manager);
-                PerformInstall(manager);
-            }
+            PackageManager manager = CreatePackageManager(Source, Destination);
+            PerformInstall(manager);
         }
 
         protected virtual void PerformInstall(PackageManager manager) {

File Source/Packages/PS-Get/Cmdlets/PsGetCmdlet.cs

 using System.Threading;
 using System.Diagnostics;
 using NuGet;
-using PsGet.Utils;
 
 namespace PsGet.Cmdlets {
     public abstract class PsGetCmdlet : PSCmdlet {
             return PackageRepositoryFactory.Default.CreateRepository(source);
         }
 
-        protected Operation StartOperation(string name) {
-            return new Operation(name, WriteProgress);
-        }
-
-        protected Operation StartOperation(string name, Operation parent) {
-            return new Operation(name, parent, WriteProgress);
-        }
-
         protected PackageManager CreatePackageManager(string source, string destination) {
             IPackageRepository repo = PackageRepositoryFactory.Default.CreateRepository(source);
             return new PackageManager(
                 new PhysicalFileSystem(destination)
             );
         }
-
-        protected void BindOperationToManager(Operation op, PackageManager manager) {
-            manager.PackageInstalling += (_, e) => {
-                StartOperation(String.Format("Installing {0}", e.Package.GetFullName()), Operation.Current);
-            };
-            manager.PackageInstalled += (_, e) => {
-                Operation.Current.Dispose();
-            };
-            manager.PackageUninstalling += (_, e) => {
-                StartOperation(String.Format("Removing {0}", e.Package.GetFullName()), Operation.Current);
-            };
-            manager.PackageUninstalled += (_, e) => {
-                Operation.Current.Dispose();
-            };
-            manager.SourceRepository.OnProgressAvailable(e => {
-                op.WriteProgress(e.Operation, e.PercentComplete);
-            });
-        }
     }
 }

File Source/Packages/PS-Get/Cmdlets/RemovePSPackageCommand.cs

-using System;   
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Management.Automation;
-using PsGet.Utils;
 using NuGet;
 
 namespace PsGet.Cmdlets {
         protected override void ProcessRecord() {
             WriteDebug(String.Format("Using Source: ", Source));
             WriteDebug(String.Format("Removing From: ", Destination));
-            using (Operation op = StartOperation(String.Format("Removing {0}", Id))) {
-                PackageManager manager = CreatePackageManager(Source, Destination);
-                BindOperationToManager(op, manager);
-                manager.UninstallPackage(Id, null, Force.IsPresent, RemoveDependencies.IsPresent);
-            }
+            PackageManager manager = CreatePackageManager(Source, Destination);
+            manager.UninstallPackage(Id, null, Force.IsPresent, RemoveDependencies.IsPresent);
         }
     }
 }

File Source/Packages/PS-Get/PS-Get.csproj

   </ItemGroup>
   <ItemGroup>
     <Reference Include="NuGet.Core">
-      <HintPath>..\..\..\packages\NuGet.Core.1.5.20818.9011\lib\net40-Client\NuGet.Core.dll</HintPath>
-      <Package>true</Package>
+      <HintPath>..\..\..\packages\NuGet.Core.1.5.20902.9023\lib\net40-Client\NuGet.Core.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />
       <DependentUpon>Reference.svcmap</DependentUpon>
     </Compile>
     <Compile Include="Settings.cs" />
-    <Compile Include="Utils\Operation.cs" />
-    <Compile Include="Utils\ProgressProviderMixin.cs" />
   </ItemGroup>
   <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

File Source/Packages/PS-Get/packages.config

+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="NuGet.Core" version="1.5.20902.9023" />
+</packages>