VSTO Excel AddIn Using Enterprise Library Swallowing Exceptions

Topics: Exception Handling Application Block
Apr 30, 2012 at 9:09 PM

I have a VSTO Excel add-in created using VS2010, and I am using exception handling from Enterprise Library 5.0. It works fine in development, but when I deploy using click once, error are getting swallowed up by Enterprise Library. I suspect enterprise library is not getting called at all, because I did this...

// my code that throws error
        catch (Exception ex)
            Globals.ThisAddIn.Application.Cursor = Microsoft.Office.Interop.Excel.XlMousePointer.xlDefault;
            MessageBox.Show("handle error '" + ex.Message + "' with enterprise Policy");
            exManager.HandleException(ex, "Policy");

And I get the dialog box, but no error gets logged or display or re-thrown.

Does anyone know why the enterprise libraries would fail to load? I checked, and they are strong signed.

Thanks Rael


Apr 30, 2012 at 9:44 PM


Ugh, seems the default behavior of Excel is to swallow add-in errors.  Had to set VSTO_SUPPRESSDISPLAYALERTS=0 to turn this off.