Skip to content

Conversation

@CalvinAllen
Copy link
Contributor

@CalvinAllen CalvinAllen commented Jan 29, 2026

Summary

  • Add comprehensive error handling to the Execute method to prevent silent failures
  • Show user-friendly error dialogs when the command fails at various stages
  • Wrap telemetry initialization in try-catch to prevent blocking (potential issue in localized VS)
  • Properly dispose telemetry activity in finally block

Problem

Users with Chinese-localized Visual Studio reported that clicking "Renamify Project" produces no response - VS shows "(Not Responding)" and no dialog appears. The Execute method had no error handling, causing failures to be completely silent.

Changes

Failure Point Before After
Telemetry init Could block/hang Caught, logged, continues
DTE service unavailable Silent return Error dialog shown
Solution Explorer access Silent return Error dialog with details
No selection Silent return Info dialog
Non-project selected Silent return Info dialog
Any unexpected error Swallowed Error dialog with issue link

Test plan

  • Build succeeds with no new errors
  • Verify command works normally in English VS
  • Test error dialogs appear by forcing failure conditions

Add comprehensive error handling to the Execute method to prevent
silent failures and provide user feedback when the command fails.

Changes:
- Wrap telemetry initialization in try-catch to prevent blocking
- Show error dialog when DTE service is unavailable
- Show error dialog when Solution Explorer selection fails
- Inform users when no project is selected
- Inform users when selected item is not a project
- Catch unexpected exceptions and display with issue report link
- Properly dispose telemetry activity in finally block

Fixes #60
@CalvinAllen CalvinAllen merged commit 152c719 into main Jan 29, 2026
5 checks passed
@CalvinAllen CalvinAllen deleted the fix/command/add-error-handling-diagnostics branch January 29, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant