Scanning Assemblies using AttributesModel in .net core produces ReflectionTypeLoadException #528
chkp-omeran
started this conversation in
General
Replies: 1 comment
-
@chkp-omeran Hi, that's the interesting problem. I don't have a simple way from the top of my head. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed the following behavior in .net 6 (which as I understand is the same in .net Core) -
If I have an assembly a.dll which depends on assembly b.dll, but my main application only references a.dll, using AttributesModel.Scan on a.dll will result in ReflectionTypeLoadException, because unlike .net Framework, .net core doesn't attempt to load indirect dependencies when loading types.
I can probably get around it by reading the ".deps.json" file of each DLL and looking for dependent assemblies, but maybe there's a simpler way to do it?
Beta Was this translation helpful? Give feedback.
All reactions