We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 189a246 commit c2ef4feCopy full SHA for c2ef4fe
DNN Platform/DotNetNuke.DependencyInjection/Extensions/TypeExtensions.cs
@@ -1,4 +1,5 @@
1
using System;
2
+using System.Linq;
3
using System.Reflection;
4
5
namespace DotNetNuke.DependencyInjection.Extensions
@@ -32,8 +33,15 @@ public static Type[] SafeGetTypes(this Assembly assembly)
32
33
{
34
types = assembly.GetTypes();
35
}
36
+ catch (ReflectionTypeLoadException ex)
37
+ {
38
+ //TODO: We should log the reason of the exception after the API cleanup
39
+ //Ensure that Dnn obtains all types that were loaded, ignoring the failure(s)
40
+ types = ex.Types.Where(x => x != null).ToArray<Type>();
41
+ }
42
catch (Exception)
- {
43
44
45
types = new Type[0];
46
47
0 commit comments