From ad05e982d85dab0ff25a23a936bdaff710f45cd7 Mon Sep 17 00:00:00 2001 From: Alicia Li Date: Tue, 27 Oct 2020 12:14:45 -0700 Subject: [PATCH 1/2] fix issue ExcelOpenXmlOutputWriter doesn't handle gracefully when NonUserAssemblies is null #936 --- .../ExcelOpenXmlOutputWriter.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/Microsoft.Fx.Portability.Reports.Excel/ExcelOpenXmlOutputWriter.cs b/src/lib/Microsoft.Fx.Portability.Reports.Excel/ExcelOpenXmlOutputWriter.cs index 20596e462..3a744a31f 100644 --- a/src/lib/Microsoft.Fx.Portability.Reports.Excel/ExcelOpenXmlOutputWriter.cs +++ b/src/lib/Microsoft.Fx.Portability.Reports.Excel/ExcelOpenXmlOutputWriter.cs @@ -225,10 +225,13 @@ private static void GenerateUnreferencedAssembliesPage(Worksheet missingAssembli } } - foreach (var unresolvedAssemblyPair in response.Request.NonUserAssemblies.OrderBy(asm => asm.AssemblyIdentity)) + if (response.Request.NonUserAssemblies != null) { - missingAssembliesPage.AddRow(unresolvedAssemblyPair.AssemblyIdentity, string.Empty, LocalizedStrings.SkippedAssembly); - detailsRows++; + foreach (var unresolvedAssemblyPair in response.Request.NonUserAssemblies.OrderBy(asm => asm.AssemblyIdentity)) + { + missingAssembliesPage.AddRow(unresolvedAssemblyPair.AssemblyIdentity, string.Empty, LocalizedStrings.SkippedAssembly); + detailsRows++; + } } // Generate the pretty table From ac818392d2cdb4446b5bc0a1f3e354be9e7b9752 Mon Sep 17 00:00:00 2001 From: Alicia Li Date: Tue, 27 Oct 2020 14:25:43 -0700 Subject: [PATCH 2/2] fix issue: Analyzing projects in VS fails due to file not found #938 --- .../ApiPort.VisualStudio.Common/Analyze/ProjectAnalyzer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ApiPort/ApiPort.VisualStudio.Common/Analyze/ProjectAnalyzer.cs b/src/ApiPort/ApiPort.VisualStudio.Common/Analyze/ProjectAnalyzer.cs index 2099f346f..0aa519d17 100644 --- a/src/ApiPort/ApiPort.VisualStudio.Common/Analyze/ProjectAnalyzer.cs +++ b/src/ApiPort/ApiPort.VisualStudio.Common/Analyze/ProjectAnalyzer.cs @@ -83,7 +83,7 @@ public ProjectAnalyzer( foreach (var file in output) { - targetAssemblies.Add(Path.GetFileName(file)); + targetAssemblies.Add(file); } referencedNuGetPackages.UnionWith(GetPackageReferences(project));