diff --git a/core/Azure.Mcp.Core/src/Services/ProcessExecution/ExternalProcessService.cs b/core/Azure.Mcp.Core/src/Services/ProcessExecution/ExternalProcessService.cs index d2ae922284..a6231986de 100644 --- a/core/Azure.Mcp.Core/src/Services/ProcessExecution/ExternalProcessService.cs +++ b/core/Azure.Mcp.Core/src/Services/ProcessExecution/ExternalProcessService.cs @@ -42,9 +42,9 @@ public async Task ExecuteAsync( processStartInfo.EnvironmentVariables[keyValuePair.Key] = keyValuePair.Value; } - using var process = new Process { StartInfo = processStartInfo }; using var outputWaitHandle = new AutoResetEvent(false); using var errorWaitHandle = new AutoResetEvent(false); + using var process = new Process { StartInfo = processStartInfo }; var outputBuilder = new StringBuilder(); var errorBuilder = new StringBuilder();