V3 Documentation

Allow Dynamic Code Contract Checking

Project-level NCrunch configuration setting Default Value: True


This setting controls whether NCrunch will allow Microsoft Code Contracts to perform runtime checking of tested code against contracts that have been specified in this code.

This setting is only applicable to projects that have been configured to use Microsoft Code Contracts.


Disabling dynamic code contract checking can improve performance of code under test, but it can also cause some contract code to throw runtime exceptions.