Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6026397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:26:21+00:00 2026-05-23T04:26:21+00:00

In previous versions of Visual Studio, there was a single entry point to an

  • 0

In previous versions of Visual Studio, there was a single entry point to an extension (more specifically, an addin), the OnConnect method. From there it was possible to perform all the Visual Studio operations, such as adding menu items, and setting up a global exception handler, to gracefully handle unhandled exceptions.

In Visual Studio 2010’s VsPackage, things work differently – many parts of the application (such as IWpfTextView) are composed by MEF and loaded without the explicit control of the package, making handling any exceptions coming from those very difficult.

Without explicitly wrapping all such components in a try..catch of their own, how can I efficiently implement a global handler for (non-critical) exceptions in my VsPackage?
Again, the goal is having something like ReSharper’s exception dialog, where it can handle global exceptions without crashing the Visual Studio.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:26:22+00:00Added an answer on May 23, 2026 at 4:26 am

    I have investigated this topic by reading official VsExtensibility forum and according to this and this threads there is no such one place to hook for catching all exceptions. So typical solution will be to use try… catches everywhere.

    I suggest to use one of the AOP frameworks like PostSharp to accomplish this with attributes in order to eliminate tons of crappy duplicated code that’s only purpose is to handle unhandled exceptions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i remember that previous versions of visual studio contained a converter, that automatically attempt
I have a .lib file created with previous versions of visual studio, perhaps 2003
In previous versions of jQuery tabs there was an option to automatically set the
Since CS3 doesn't have a web service component, as previous versions had, is there
What steps are needed to target previous versions of the .NET framework in Visual
(I'm using Visual Studio 2008, though I remember having similar problems with older versions
When installing SQL Server Express Edition 2008, checklist says Previous version of Visual Studio
I have a VSTO addin for Word. Developed with Visual Studio 2010 (for Word
I know that this was an advanced compiler option in previous versions of Visual
Are there any hacks around the normal (and infuriating) Visual Studio Deploy Solution numbering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.