views:

89

answers:

1

in Debug mode the tests which throw a custom exception give an error message like

Exception of type 'CustomProductException' was thrown instead of 'CustomProductException'

Fail.But when I choose Test - Run - All Tests in Solution rather than Debug, all Tests pass.Why is this happening? Any pointers...

+1  A: 

I've had this happen before. I believe the issue was my references. Clean your entire solution, and delete every reference in every project in your solution to the assembly that contains CustomProductException.

Next, re-add your references, making sure to reference the project that compiles the assembly, not the compiled assembly on disk.

Will