V3 Documentation
Search

Using NCrunch With Source Control

NCrunch has been designed with consideration for teams that want to share settings via source control systems.

For this reason, the main areas of configuration (global, solution and project) are separated into different files that are stored throughout the solution directory.

NCrunch stores data in the following files:

File Stored At Contains
globalconfig.crunch.v3.xml AppData\Roaming\NCrunch Global settings specific to the currently logged in user
_NCrunch_SOLUTION\*.* Solution Directory Cached data such as test results and code coverage information
SOLUTION.v3.ncrunchsolution.user Solution Directory User preferences specific to the solution, such as column/filter arrangements within tool windows and the currently selected engine mode
nCrunchTemp_* Project Directories Temporary generated files used when NCrunch is loading projects. Under normal circumstances, these are automatically removed and should rarely be seen. Otherwise, they can usually be safely deleted
SOLUTION.v3.ncrunchsolution Solution Directory Solution-specific configuration settings, metrics exclusion list, engine mode settings
PROJECT.v3.ncrunchproject Project Directories Project-specific configuration settings and ignored tests list

It's recommended that the last two files listed in the above table (.v3.ncrunchsolution and .v3.ncrunchproject) be stored inside a source control system to be shared with team members. These files contain settings that are critical to being able to build projects and run tests, and as such they will be needed by anyone seeking to use NCrunch with the solution. Because these two files are named according to the NCrunch version, they can exist side-by-side with their equivalents for other NCrunch versions. This means it is possible for a solution to be shared by team members using different versions of NCrunch.

The remaining files should be placed on an exclusion list and left out of the source control system. These files contain user preference information and cached data that is not ideal for sharing within a team.

NCrunch settings files without a '.v3' in them are not used by the latest version of NCrunch and can be safely removed.