V3 Documentation
Search

Allow Static Code Contract Checking

Project-level NCrunch configuration setting Default Value: False

Purpose

This setting controls whether NCrunch will allow Microsoft Code Contracts to perform static checking of code within assemblies built for this project.

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

Recommendations

Static code contract checking is extremely expensive and will result in significantly higher test cycles times. As such, it is disabled by default.

An advantage of turning on static code contract checking is that it can provide an extra level of testing performed during the build process. Code contract issues raised during checking are reported by NCrunch as build failures.