C
C#2y ago
Alerin

❔ System.Reflection.ReflectionTypeLoadException: „Unable to load one or more of the requested types.

System.Reflection.ReflectionTypeLoadException: „Unable to load one or more of the requested types.
Could not load type 'SqlGuidCaster' from assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.”
System.Reflection.ReflectionTypeLoadException: „Unable to load one or more of the requested types.
Could not load type 'SqlGuidCaster' from assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.”
in code:
private IEnumerable<Assembly> Types()
=> GetAssemblies()
.SelectMany(s => s.GetTypes())
.Where(p =>
p.IsClass &&
p.IsAbstract == false &&
typeof(IAreaWeb).IsAssignableFrom(p)
)
.Select(x => x.Assembly);
private IEnumerable<Assembly> Types()
=> GetAssemblies()
.SelectMany(s => s.GetTypes())
.Where(p =>
p.IsClass &&
p.IsAbstract == false &&
typeof(IAreaWeb).IsAssignableFrom(p)
)
.Select(x => x.Assembly);
in line: s.GetTypes() I upgraded from .net 7 to .net 8. Anyone have any idea how to fix this error?
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server