V3 Documentation
Search

Compatibility Mode

Description

Although NCrunch doesn't have a distinct 'compatibility mode' feature that can be turned on and off, compatibility mode does exist as a general concept that can be used to help with troubleshooting problems experienced when using NCrunch.

NCrunch has a range of different configuration settings that control the behaviour of its workspacing, build process and test runner. The default configuration settings have been carefully chosen to strike a balance between performance and compatibility that should allow many solutions to work with minimal configuration changes required. However, when problems are experienced, it can be very difficult to identify which configuration options should be changed and how to identify the true cause of the problems.

Turning on compatibility mode is an activity that can make this troubleshooting easier.

Turning On Compatibility Mode

Compatibility mode is a configuration state where a number of options are set to offer the closest possible alignment between NCrunch and a normal build/testing situation.

To turn on compatibility mode, adjust the following configuration settings. Note that you can use multiple selection in the configuration pane when applying project-level settings. Project-level settings should be applied to all projects in the solution.

Category Setting Default Value Suggested Value Reasoning
Solution Allow Parallel Test Execution False False Remove concurrency considerations
Project Instrument Output Assembly True False Avoid manipulation of assemblies after build
Project Include Static References In Workspace True False Closer build alignment
Project Pre-load Assembly references False True Tighter test environment control
Project Copy Referenced Assemblies To Workspace False True Closer build alignment
Project Run Pre-Build Event False True Closer build alignment
Project Run Post-Build Event False True Closer build alignment
Project Track File Dependencies True False Avoid low level API hooks during test execution

Recommendations

Compatibility mode can be useful for narrowing down and solving problems encountered when introducing NCrunch to an existing solution. However, it should not be considered a normal working mode, as the compatibility mode settings involve turning off many of the features that make NCrunch useful.

Once problems have been isolated and corrected, it is strongly recommended that you reverse the compatibility mode settings in order to re-enable NCrunch features and improve performance. Where custom configuration does not yet exist, a simple way to do this is to close down Visual Studio, deleting NCrunch solution and project configuration files, then reloading Visual Studio and re-enabling NCrunch for the solution.