Skip to content

Commit

Permalink
fix: Changed to use .GetExportedTypes instead of .GetTypes.
Browse files Browse the repository at this point in the history
This is a workaround for an issue in System.Data which throws a "Could not load type 'SqlGuidCaster' from assembly 'System.Data.SqlClient, Version=4.6.1.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.

Reference: dotnet/SqlClient#1930
  • Loading branch information
anthony-glenwright committed Jan 19, 2024
1 parent 391111f commit acea420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Nucleus.Web/Controllers/Setup/SiteWizardController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ private static Type[] GetTypes(System.Reflection.Assembly assembly)
{
try
{
return assembly.GetTypes();
return assembly.GetExportedTypes();
}
catch (System.Reflection.ReflectionTypeLoadException)
{
Expand Down

0 comments on commit acea420

Please sign in to comment.