【发布时间】:2014-02-28 21:46:52
【问题描述】:
我遇到了这个异常
System.IO.IOException:操作成功完成。
在下面的代码块中。此代码在 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 并读取错误流以检查错误。
标签: c# powershell