diff --git a/src/gutenapp/gutenapp/AssemblyFileResolver.cs b/src/gutenapp/gutenapp/AssemblyFileResolver.cs index e3db2c7..92226fe 100644 --- a/src/gutenapp/gutenapp/AssemblyFileResolver.cs +++ b/src/gutenapp/gutenapp/AssemblyFileResolver.cs @@ -205,7 +205,10 @@ public class AssemblyFileResolver foreach (var dir in dirs) { var (libraryFound, libraryPath) = ProbeDirectoryForLibrary(dir, library); - candidateLibs.Add(libraryPath); + if (libraryFound) + { + candidateLibs.Add(libraryPath); + } } } diff --git a/src/gutenapp/gutenapp/Program.cs b/src/gutenapp/gutenapp/Program.cs index e66da97..d7d6193 100644 --- a/src/gutenapp/gutenapp/Program.cs +++ b/src/gutenapp/gutenapp/Program.cs @@ -30,7 +30,7 @@ static async Task Main(string[] args) if (!wordcountFound || !mostcommonwordsFound) { - throw new Exception(); + throw new ApplicationException("Can't find 'wordcount' or 'mostcommonwords' components."); } var (wordcountContext, wordCountAsm) = ComponentContext.CreateContext(wordCountPath);