public override void Context() { RemoveAndCreateDirectory(destDir1); RemoveAndCreateDirectory(destDir2); var defaultPackageSource = new PackageSource(NuGetConstants.DefaultFeedUrl); var settings = Settings.LoadDefaultSettings(); IPackageSourceProvider sourceProvider = new PackageSourceProvider(settings, new[] { defaultPackageSource }); IPackageRepositoryFactory repositoryFactory = new CommandLineRepositoryFactory(); command = new Copy(repositoryFactory, sourceProvider); command.Console = new Console(); }