We use Microsoft's code contracts in our codebase.
A project had Contract.Requires statements in it, without the build configuration that is released having "Perform Runtime Contract Checking" checkbox being ticked.
When the release build hits the Contract.Requires statement, an exception is generated. This eventually trickles up and causes a System.ServiceModel.CommunicationException in the web service that uses the code contracts.
There was no indication anywhere in the exception** that this was a code contracts issue.
Is there any way to expose the fact that it's a code contract issue?
The issue was resolved by ticking the "Perform Runtime Contract Checking" checkbox for the release build configuration, but it would be good to ALSO have better diagnostic information available at runtime.

** Still working on digging into the inner exceptions.