Skip to content

Commit f8b654f

Browse files
committed
- removed loading of System.Data.SqlClient.dll for NET8 due to an issue with the package: dotnet/SqlClient#1930
1 parent 5bf27b1 commit f8b654f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/10 Core/Signals.Core/Configuration/Bootstrapping/ApplicationBootstrapConfiguration.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,20 @@ internal virtual IServiceContainer Resolve(ConfigurationBootstrapper configurati
231231
}
232232

233233
this.D("Loading all types under Signals.* namespace.");
234-
_allTypes = scanAssemblies.SelectMany(
234+
235+
// fix for NET8: https://github.com/dotnet/SqlClient/issues/1930
236+
#if NET8_0
237+
scanAssemblies = scanAssemblies.Where(x => !x.Location.Contains("System.Data.SqlClient.dll")).ToArray();
238+
#endif
239+
240+
_allTypes = scanAssemblies.SelectMany(
235241
assembly => assembly.LoadAllTypesFromAssembly()
236242
.Where(type => type != null &&
237243
!string.IsNullOrEmpty(type.FullName) &&
238244
type.FullName.StartsWith("Signals")))
239245
.ToList();
240-
this.D($"Total {_allTypes.Count} types under Signals has been loaded.");
246+
247+
this.D($"Total {_allTypes.Count} types under Signals has been loaded.");
241248

242249
config.JsonSerializerSettings = () => JsonSerializerSettings;
243250
this.D("Set default JsonSerializerSettings.");

0 commit comments

Comments
 (0)