c# 4.0 -给定的路径's格式不支持c#
本文关键字:不支持 格式 路径 | 更新日期: 2023-09-27 17:53:06
static void cmd_DataReceived(object sender, DataReceivedEventArgs e)
{
List<string> found = new List<string>();
string line;
using(StreamReader file = new StreamReader(e.Data))
{
while((line = file.ReadLine()) != null)
{
if(line.Contains("Passed"))
{
found.Add(line);
}
}
}
foreach (string Txt in found)
{
Report.Info("Output from other process");
Report.Success(Txt);
}
}
上面的代码给出了异常。我得到的例外。System.NotSupportedException: The given path's format is not supported.
at System.Security.Util.StringExpressionSet.CanonicalizePath
at System.Security.Util.StringExpressionSet.CreateListFromExpressions
at System.Security.Permissions.FileIOPermission.AddPathList
我在ranorex测试自动化工具中运行这个c#代码。
我不认为这是Ranorex的问题。代码中的哪一行导致了错误?