Possibly added to .NET 7 a future .NET version, the SatisfiesConstraints check allows Simple Injector to do a reliable test instead of catching the exception thrown by MakeGenericType, which prevents unwanted first chance exceptions.
Downside of implementing this is that a new build output is added to the Simple Injector package.
See: https://github.com/dotnet/runtime/issues/28033
Possibly added to
.NET 7a future .NET version, theSatisfiesConstraints
check allows Simple Injector to do a reliable test instead of catching the exception thrown byMakeGenericType
, which prevents unwanted first chance exceptions.Downside of implementing this is that a new build output is added to the Simple Injector package.