Ejemplo n.º 1
0
 private string GetExecutionRunner(ExecutionCommand command, DotNetExecutionCommand dotcmd)
 {
     if (command is ProcessExecutionCommand processExecutionCommand && processExecutionCommand.ProcessExecutionArchitecture != ProcessExecutionArchitecture.Unspecified)
     {
         return(runtime.GetMonoExecutable(processExecutionCommand.ProcessExecutionArchitecture));
     }
     return(runtime.GetMonoExecutableForAssembly(dotcmd.Command));
 }
        public override ProcessAsyncOperation Execute(ExecutionCommand command, OperationConsole console)
        {
            var dotcmd = (DotNetExecutionCommand)command;

            string runtimeArgs = string.IsNullOrEmpty(dotcmd.RuntimeArguments) ? "--debug" : dotcmd.RuntimeArguments;

            var monoRunner = runtime.GetMonoExecutableForAssembly(dotcmd.Command);

            string args = string.Format("{2} \"{0}\" {1}", dotcmd.Command, dotcmd.Arguments, runtimeArgs);
            NativeExecutionCommand cmd = new NativeExecutionCommand(monoRunner, args, dotcmd.WorkingDirectory, dotcmd.EnvironmentVariables);

            return(base.Execute(cmd, console));
        }