Ejemplo n.º 1
0
 private static void RestoreTools(Project project, RestoreTask restoreTask, bool quiet)
 {
     foreach (var tooldep in project.Tools)
     {
         RestoreTool(tooldep, restoreTask, quiet);
     }
 }
Ejemplo n.º 2
0
        private static void RestoreTool(LibraryRange tooldep, RestoreTask restoreTask, bool quiet)
        {
            var tempRoot = Path.Combine(restoreTask.ProjectDirectory, "obj");
            try
            {
                var tempPath = Path.Combine(tempRoot, Guid.NewGuid().ToString(), "bin");

                var restoreSucceded = RestoreToolToPath(tooldep, restoreTask.Arguments, tempPath, quiet);
                if (restoreSucceded)
                {
                    CreateDepsInPackageCache(tooldep, tempPath);
                    PersistLockFile(tooldep, tempPath, restoreTask.ProjectDirectory);
                }
            }
            finally
            {
                Directory.Delete(tempRoot, true);
            }
        }
Ejemplo n.º 3
0
        private static void RestoreTool(LibraryRange tooldep, RestoreTask restoreTask)
        {
            var tempRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
            try
            {
                var tempPath = Path.Combine(tempRoot, "bin");

                RestoreToolToPath(tooldep, restoreTask.Arguments, tempPath);

                CreateDepsInPackageCache(tooldep, tempPath);

                PersistLockFile(tooldep, tempPath, restoreTask.ProjectDirectory);
            }
            finally
            {
                Directory.Delete(tempRoot, true);
            }
        }