Skip to content

When PM UI fails to load, show a window with exception details - #7542

Merged
zivkan merged 3 commits into
devfrom
dev-zivkan-pm-ui-open-error-window
Jul 15, 2026
Merged

zivkan merged 3 commits into
devfrom
dev-zivkan-pm-ui-open-error-window

Conversation

@zivkan

@zivkan zivkan commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14977

Description

Wraps the "Create PM UI window" method in a try block, where the catch block opens a document window showing the exception message and stack trace. It still records fault telemetry, so even if customers don't report the problem to us, we should still have data about it.

It intentionally does not use XAML, because sometimes when trying to debug/test NuGet in Visual Studio's experimental instance, there are BAML resource loading failures. So, creating the WPF control tree programmatically makes it more resilient to those errors.

It's extremely basic, but customers should never see this. It's a failsafe, last resort effort. Example:

image

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@zivkan
zivkan requested a review from a team as a code owner July 7, 2026 05:46
@zivkan
zivkan requested review from jebriede and kartheekp-ms July 8, 2026 21:14
@zivkan
zivkan merged commit 1d11acd into dev Jul 15, 2026
20 of 21 checks passed
@zivkan
zivkan deleted the dev-zivkan-pm-ui-open-error-window branch July 15, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show an error if Package Manager UI fails to load in VS

3 participants