From e8e69dc1ccedbb6c347baa8ada2706c16346dbf5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 1 Dec 2019 18:53:21 +0100 Subject: [PATCH] only check exported types so that we don't crash on internal types --- Contentless/Contentless.nuspec | 2 +- Contentless/Program.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Contentless/Contentless.nuspec b/Contentless/Contentless.nuspec index af4df98..0e34647 100644 --- a/Contentless/Contentless.nuspec +++ b/Contentless/Contentless.nuspec @@ -2,7 +2,7 @@ Contentless - 2.0.3 + 2.0.4 Ellpeck A tool for MonoGame that automatically handles adding assets to the Content Pipeline project monogame mono xna content pipeline mgcb builder tool library diff --git a/Contentless/Program.cs b/Contentless/Program.cs index df0f970..1e3dece 100644 --- a/Contentless/Program.cs +++ b/Contentless/Program.cs @@ -142,7 +142,7 @@ namespace Contentless { private static IEnumerable GetContentImporters() { foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { - foreach (var type in assembly.GetTypes()) { + foreach (var type in assembly.GetExportedTypes()) { var importer = (ContentImporterAttribute) type.GetCustomAttribute(typeof(ContentImporterAttribute), true); if (importer != null) yield return new ImporterInfo(importer, type); @@ -152,7 +152,7 @@ namespace Contentless { private static IEnumerable GetContentProcessors() { foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { - foreach (var type in assembly.GetTypes()) { + foreach (var type in assembly.GetExportedTypes()) { var processor = type.GetCustomAttribute(typeof(ContentProcessorAttribute), true); if (processor != null) yield return type.Name;