我得到这个例外“System.IO.IOException:操作成功完成”异常
在下面的代码块System.IO.IOException: The operation completed successfully.
。此代码在Windows服务中运行。
foreach (var error in _currentPowerShell.Streams.Error)
{
if (!string.IsNullOrEmpty(error.FullyQualifiedErrorId))
{
if (!(error.CategoryInfo.Activity == "Get-Alias"))
throw error.Exception;
}
}
它没有任何意义,因为我没有做任何IO操作!
这是Powershell错误流。我正在调用PowerShell和读取错误流来检查错误。 – AccurateEstimate