V3 Documentation
Search

Allow Dynamic Code Contract Checking

Project-level NCrunch configuration setting Default Value: True

Purpose

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.

Recommendations

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