Пример #1
0
 public static void Main(params string[] args)
 {
     var packageId = args.Length > 0 ? args[0] : "NUnit";
     var installer = new PackageInstaller(
         PackageRepositoryFactory.Default.CreateRepository(NuGetConstants.DefaultFeedUrl), new Console());
     var projectPath =
         Assembly.GetExecutingAssembly().Location.ParentDirectory().ParentDirectory().ParentDirectory().AppendPath("NuGetSample.csproj");
     System.Console.WriteLine(projectPath);
     var packagePath = projectPath.ParentDirectory().AppendPath("testPackages");
     installer.InstallPackage(packageId, projectPath, packagePath);
     System.Console.ReadLine();
 }
Пример #2
0
        public static void Main(params string[] args)
        {
            var packageId = args.Length > 0 ? args[0] : "NUnit";
            var installer = new PackageInstaller(
                PackageRepositoryFactory.Default.CreateRepository(NuGetConstants.DefaultFeedUrl), new Console());
            var projectPath =
                Assembly.GetExecutingAssembly().Location.ParentDirectory().ParentDirectory().ParentDirectory().AppendPath("NuGetSample.csproj");

            System.Console.WriteLine(projectPath);
            var packagePath = projectPath.ParentDirectory().AppendPath("testPackages");

            installer.InstallPackage(packageId, projectPath, packagePath);
            System.Console.ReadLine();
        }