private Process StartProcessWithRequest(AgentRequest request, string workingDirectory)
        {
            var agentPath = request.GetType().Assembly.Location;


            var startInfo = new ProcessStartInfo(agentPath)
            {
                WorkingDirectory       = workingDirectory,
                UseShellExecute        = false,
                RedirectStandardOutput = true,
                RedirectStandardError  = true,
                RedirectStandardInput  = true,
                CreateNoWindow         = true
            };

            using (var activationDirectory = new WorkingDirectory())
            {
                startInfo.EnvironmentVariables["COMPLUS_ApplicationMigrationRuntimeActivationConfigPath"] = activationDirectory.DirectoryInfo.FullName;
                if (_clrVersion == ClrVersion.Version4)
                {
                    var configPath = Path.Combine(activationDirectory.DirectoryInfo.FullName, string.Concat(Path.GetFileName(agentPath), ".activation_config"));
                    File.WriteAllText(configPath, ClrVersion4ActivationConfigContent);
                }

                var namedPipeName = string.Format("{0}.{1}", GetType().FullName, Guid.NewGuid());
                startInfo.Arguments = namedPipeName;
                using (var pipeServer = new NamedPipeServerStream(namedPipeName, PipeDirection.InOut, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous))
                {
                    var messagePipe = new MessagePipe(pipeServer);

                    var ar = pipeServer.BeginWaitForConnection(null, pipeServer);

                    var process = Process.Start(startInfo);

                    pipeServer.EndWaitForConnection(ar);

                    messagePipe.WriteMessage(request);

                    pipeServer.WaitForPipeDrain();

                    return(process);
                }
            }
        }