Beispiel #1
0
        private static string GetExecutable(string alias, string framework, string executable)
        {
            var dnxPath = DnxHelper.GetDnxPath(alias, framework);

            if (dnxPath != null)
            {
                return(Path.Combine(dnxPath, "bin", executable));
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
        public static bool RestorePackage(string workingDir, string framework, bool quiet = false)
        {
            var kpmPath = DnxHelper.GetDnuExecutable(alias: "default", framework: framework);

            var psi = new ProcessStartInfo(kpmPath)
            {
                Arguments        = "restore" + (quiet ? " --quiet" : ""),
                WorkingDirectory = workingDir,
                UseShellExecute  = false
            };

            var proc = Process.Start(psi);

            var exited = proc.WaitForExit(300 * 1000);

            return(exited && proc.ExitCode == 0);
        }