New Posts New Posts RSS Feed: MEF Error Message
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

MEF Error Message

 Post Reply Post Reply
Author
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Topic: MEF Error Message
    Posted: 06-Feb-2013 at 5:16pm
One issue I have with MEF is the apparent lack of descriptive exceptions.

For example, if my ViewModel imports a SubViewModel which itself has an import error, the resulting error message at runtime is simply that the ViewModel could not be found.

Now, looking at the debug window shows more detailed messages about what went wrong that can be used to resolve.

But I would rather get a runtime exception of the original error. I know in the past I have spent a lot of time trying to trace this type of error to it's source.

Anyhow, am I missing something, or is this the only debugging possible of MEF?

Greg
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 07-Feb-2013 at 8:25am
No, you are not really missing anything. What platform are you developing on? What you describe is pretty much state of the art for Silverlight and .NET 4. There is some debugging and diagnostics stuff in MefContrib, but unfortunatley that project is dead. In .NET 4.5 however things have improved. The lack of diagnositc and debugging info was a major criticism on MEF and Microsoft has improved things. The runtime exceptions in .NET 4.5 are much more descriptive and tell you the actual problem.
Back to Top
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Posted: 07-Feb-2013 at 8:31am
Thanks, just moved over to .NET 4.5 and enabled the MEF exceptions and that is much better now.

Greg
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down