diff --git a/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/Program.cs b/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/Program.cs index 59db4d3b6f96..c29b9d7ce0b8 100644 --- a/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/Program.cs +++ b/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/Program.cs @@ -99,8 +99,12 @@ static async Task HandlePackageFileParsing(Stream stream, FileInfo packageFilePa } } - dependencyFilesTempDir = await ExtractNugetDependencies(dependencies).ConfigureAwait(false); - var dependencyFilePaths = Directory.EnumerateFiles(dependencyFilesTempDir, "*.dll", SearchOption.AllDirectories); + IEnumerable dependencyFilePaths = null; + if (dependencies != null && dependencies.Any()) + { + dependencyFilesTempDir = await ExtractNugetDependencies(dependencies).ConfigureAwait(false); + dependencyFilePaths = Directory.EnumerateFiles(dependencyFilesTempDir, "*.dll", SearchOption.AllDirectories); + } var assemblySymbol = CompilationFactory.GetCompilation(dllStream, docStream, dependencyFilePaths); if (assemblySymbol == null)