Making Static Code Analysis and Code Contracts work together, or the CA1062 problem
UPDATED: Feb 16th 2012: Workaround #1 and #2 only works when run-time checking is not enabled. Added workaround #2B which seems to work. Thanks to David S, Michael S and ZbynekZ for pointing this out, and sorry for not responding faster to this. Also added comments and overviews over what happens for different settings. Continue Reading →