From 3ec071203101af0f69fa739d6d7645614ebdec1e Mon Sep 17 00:00:00 2001 From: peterhel Date: Fri, 13 Sep 2024 16:15:40 +0200 Subject: [PATCH] Update TypeSourceSelector.cs https://github.com/dotnet/SqlClient/issues/1930 > I had the same issue here. After changing to GetExportedTypes() seems to fix the issue --- src/Scrutor/TypeSourceSelector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scrutor/TypeSourceSelector.cs b/src/Scrutor/TypeSourceSelector.cs index e3f836b..f0a53d0 100644 --- a/src/Scrutor/TypeSourceSelector.cs +++ b/src/Scrutor/TypeSourceSelector.cs @@ -154,7 +154,7 @@ private IImplementationTypeSelector InternalFromAssembliesOf(IEnumerable t private IImplementationTypeSelector InternalFromAssemblies(IEnumerable assemblies) { - return AddSelector(assemblies.SelectMany(asm => asm.DefinedTypes).Select(x => x.AsType())); + return AddSelector(assemblies.SelectMany(asm => asm.ExportedTypes); } private static IEnumerable LoadAssemblies(IEnumerable assemblyNames)