Windows Develop Bookmark and Share   
 index > Windows Forms General > Using Exception Management Application Block with CAD program add-in...
 

Using Exception Management Application Block with CAD program add-in...

I am developing a Winforms add-in for a major CAD package. I have incorporated EMAB throughout the add-in, which is comprised of 11 forms. All of the forms are encapsulated in 4 separate .dll assemblies. When I invoke the add-in from my test harness, the app.config for the harness is referenced so my custom publishers work flawlessly. 

However, when the add-in is invoked from the CAD program, the assemblies are loaded as interops by the program. No app.config is read, so the custom publishers don't work. The default publisher works (application Event Log), but I have built user interaction (via MsgBox and email) into the custom publishers. Any handled error during runtime goes unnoticed by the user.

I have searched the web extensively for a solution, but haven't seen anything substantive. I have seen instances of custom configuration "loaders", but I can't seem to get my head around how to implement in the invoked assembly. Has anyone else encountered/overcome this issue?

TIA,

Eric
MigrationUser 1  Tuesday, March 08, 2005 2:44 PM
Just a thought, you don't have to use EMAB for exception management.  You could build your own exception management assembly which isn't reliant on EMBA or config files.

Also have you tried putting the config files in the same directory as the CAD exe?
MigrationUser 1  Tuesday, March 08, 2005 5:55 PM
I tried putting the config files in the CAD dir, to no avail.

I actually took over this project, and the previous developer had implemented some poor error-handling. I have been using the EMAB for quite awhile; I like it's ease of use/maintainability, and the flexibility it gives you to customize your error handling. I am trying to establish use of the Application Blocks (and eventually the new Enterprise Library) as the standard for development here. They greatly speed up development, and since they are built on best practices by MS you can be confident that they are bomb-proof.

That being said, I find it hard to understand why deployment for DLL's was not incorporated into the Block frameworks. I will keep trying to find a solution, but would appreciate anyone's input.

Thanks!

Eric
MigrationUser 1  Wednesday, March 09, 2005 12:53 PM

You can use google to search for other answers

Custom Search

More Threads

• Which project to use?
• How to poll something within a form?
• How to access webservice added to Sharepoint Server
• How to access data from .csv file from a network using Visual basic 2008
• How to Trigger an Event When a tabpage is loaded?
• ListView items getting out of order when using Groups
• how can i add a new form in vc++2005 express
• Listbox item selection
• MSMQ Polling
• winapi for c#