I am having a nuisance problem with a C# app. To simplify the scenario, I have a main .exe project which references another C# library as a direct DLL dependency. This DLL throws exceptions in a particular place, and the debugger is breaking on those. However, the exception is handled and not re-thrown. My exceptions dialog in VS is checked to only have the debugger break on User-Unhandled exceptions of this type (InvalidOperationException), yet it is still breaking.
However if I link the same library as a project reference (rather than to the compiled DLL) the debugger no longer breaks on this exception.
As well, if I run the .exe program directly (outside the debugger) I see no evidence that this exception is not being handled as I expect. No errors, and my logging indicates the expected control flow.
The related code has been mostly unchanged for some time, but I have refactored my solutions and projects; I was previously using only project references, so perhaps never spotted this issue until I went to DLL references.
Can anyone suggest anything else I might look at as to why the debugger is breaking on this handled exception?