From d7834171627c16c12dca2c4d6b99fa18a88a6467 Mon Sep 17 00:00:00 2001 From: "Andrew Hall (METAL)" Date: Wed, 6 Feb 2019 14:44:25 -0800 Subject: [PATCH] Only filter InvalidOperation from the GetPackageSpecsAsync call --- .../Core/Def/Packaging/PackageInstallerServiceFactory.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs b/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs index 98813bbf2a2..63ab8b75f77 100644 --- a/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs +++ b/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs @@ -502,12 +502,13 @@ private void ProcessProjectChange(Solution solution, ProjectId projectId) // Nuget may throw an ArgumentException when there is something about the project // they do not like/support. } - catch (InvalidOperationException) + catch (InvalidOperationException e) when (e.StackTrace.Contains("NuGet.PackageManagement.VisualStudio.NetCorePackageReferenceProject.GetPackageSpecsAsync")) { // NuGet throws an InvalidOperationException if details // for the project fail to load. We don't need to report // these, and can assume that this will work on a future // project change + // This should be removed with https://github.com/dotnet/roslyn/issues/33187 } catch (Exception e) when (FatalError.ReportWithoutCrash(e)) { -- GitLab