From 3ec071203101af0f69fa739d6d7645614ebdec1e Mon Sep 17 00:00:00 2001 From: peterhel Date: Fri, 13 Sep 2024 16:15:40 +0200 Subject: [PATCH 1/2] 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 e3f836bd..f0a53d05 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) From 3a0de321f16ed23390707b23372768830aa73894 Mon Sep 17 00:00:00 2001 From: Kristian Hellang Date: Wed, 25 Sep 2024 08:51:26 +0200 Subject: [PATCH 2/2] Update src/Scrutor/TypeSourceSelector.cs Co-authored-by: 121GWJolt ("Jolt") <121GWJolt@users.noreply.github.com> --- 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 f0a53d05..4443ba9d 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.ExportedTypes); + return AddSelector(assemblies.SelectMany(asm => asm.ExportedTypes)); } private static IEnumerable LoadAssemblies(IEnumerable assemblyNames)