コード例 #1
0
ファイル: Program.cs プロジェクト: amughni/BlogSamples
 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
ファイル: Program.cs プロジェクト: sandyarmstrong/BlogSamples
        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();
        }