Skip to content

Commit

Permalink
- removed loading of System.Data.SqlClient.dll for NET8 due to an iss…
Browse files Browse the repository at this point in the history
…ue with the package: dotnet/SqlClient#1930
  • Loading branch information
Suaveit committed Nov 10, 2024
1 parent 5bf27b1 commit f8b654f
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,20 @@ internal virtual IServiceContainer Resolve(ConfigurationBootstrapper configurati
}

this.D("Loading all types under Signals.* namespace.");
_allTypes = scanAssemblies.SelectMany(

// fix for NET8: https://github.com/dotnet/SqlClient/issues/1930
#if NET8_0
scanAssemblies = scanAssemblies.Where(x => !x.Location.Contains("System.Data.SqlClient.dll")).ToArray();
#endif

_allTypes = scanAssemblies.SelectMany(
assembly => assembly.LoadAllTypesFromAssembly()
.Where(type => type != null &&
!string.IsNullOrEmpty(type.FullName) &&
type.FullName.StartsWith("Signals")))
.ToList();
this.D($"Total {_allTypes.Count} types under Signals has been loaded.");

this.D($"Total {_allTypes.Count} types under Signals has been loaded.");

config.JsonSerializerSettings = () => JsonSerializerSettings;
this.D("Set default JsonSerializerSettings.");
Expand Down

0 comments on commit f8b654f

Please sign in to comment.