File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ private static (List<ImporterInfo>, List<string>) GetContentData() {
255255 try {
256256 if ( assembly . IsDynamic )
257257 continue ;
258- foreach ( var type in assembly . GetExportedTypes ( ) ) {
258+ foreach ( var type in Program . GetTypes ( assembly ) ) {
259259 var importer = ( ContentImporterAttribute ) type . GetCustomAttribute ( typeof ( ContentImporterAttribute ) , true ) ;
260260 if ( importer != null )
261261 importers . Add ( new ImporterInfo ( importer , type ) ) ;
@@ -270,6 +270,15 @@ private static (List<ImporterInfo>, List<string>) GetContentData() {
270270 return ( importers , processors ) ;
271271 }
272272
273+ private static IEnumerable < Type > GetTypes ( Assembly assembly ) {
274+ try {
275+ return assembly . GetTypes ( ) ;
276+ } catch ( ReflectionTypeLoadException e ) {
277+ // if we failed to load some types, still return the ones that were successful
278+ return e . Types . Where ( t => t != null ) ;
279+ }
280+ }
281+
273282 private static IEnumerable < OverrideInfo > GetOverrides ( Dictionary < string , Override > config ) {
274283 foreach ( var entry in config )
275284 yield return new OverrideInfo ( entry . Key , entry . Value ) ;
You can’t perform that action at this time.
0 commit comments