3

I use NHibernate and Enterprise Library for my project. I do some calls like new UnityContainerConfigurator(_container), _container.RegisterInstance(instance), and var configuration = new NHibernate.Cfg.Configuration() which causing VS to stop as they throw internal exceptions (first two throws SynchronizationLockException and the last one - BindingFailure).

If I press F5, it skips this exception and continue running, so I assume these have happened internally in the libraries and were handled. But I have no idea why VS keeps notifying me about these.

I have "Enable Just My Code" option turned on. As I understood if this option is turned on, these exceptions should not interrupt the execution as they are internal to the libraries I use, but this is not so in practice.

At Exception window (Ctrl+Alt+E) I have all exceptions marked as "Thrown". But that is actually what I need - I want to be notified for any exception happened in my code, but not the code from the libraries. I do not want to unset this configuration or filter the exceptions bothering me and check them out.

Any ideas how to achieve the desired behavior?

Archeg
  • 8,364
  • 7
  • 43
  • 90

1 Answers1

1

From Top Menu, Select Debug menu item; then select Exceptions. Make sure that Common Language Runtime Exceptions is checked.

And for more information about SynchronizationLockException and Unity Container, refer to this so question.

Community
  • 1
  • 1
daryal
  • 14,643
  • 4
  • 38
  • 54
  • Thanks for the answer. They are checked. And this is exactly what causing the problem. But I do not want to uncheck them - this check is quite useful. As for the link to the SO question, thank - this one is quite interesting. It is not solving the problem I have, but I definitely have to look at that more. – Archeg Nov 04 '13 at 15:21