In C#, while loading DLL from folder using the below code getting these below stack trace, when tried to get the types.
var assembly = Assembly.LoadFile(assemblyInfo.FullName); // assembly loads perfectly using the absolute path.
var types = assembly.GetTypes(); // this line throws the below stacktrace.
Stack trace:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
I also have checked existing solutions: Error message 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.', Loading DLLs at runtime in C# (didn't work)