diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs index 161802084d..fb4cd8a389 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs @@ -215,7 +215,7 @@ namespace Microsoft.ML.OnnxRuntime.Tests private static Func> getOpsetDirectories = delegate (DirectoryInfo modelsDirInfo) { - return modelsDirInfo.EnumerateDirectories("opset*", new EnumerationOptions(){RecurseSubdirectories = true}); + return modelsDirInfo.EnumerateDirectories("opset*", SearchOption.AllDirectories); }; private static Dictionary GetSkippedModels(DirectoryInfo modelsDirInfo)