Documentation

Documentation
V5 Documentation

Copy Referenced Assemblies To Workspace

Project-level NCrunch configuration setting Default Value: False
ID/Tag in config file: CopyReferencedAssembliesToWorkspace

Purpose

When MSBuild/VS builds a project, it will normally copy all assemblies and their resources referenced by the built project into the build output directory. As part of its optimised build, NCrunch normally suppresses this behaviour.

The suppression of referenced assembly copying is controlled by the Copy referenced assemblies to workspace configuration option. When this option is set to true, NCrunch will allow the build to copy referenced assemblies according to its normal behaviour.

This configuration option has significant implications for the arrangement of NCrunch's test environment and the time taken to build projects within the solution.

Recommendations

Turning on this configuration setting will allow NCrunch to work around many situations where tests or build steps have been engineered under the assumption of referenced assemblies being collocated with assemblies that reference them.

There are some frameworks (such as certain IoC containers, MS Code Contracts and MSTest private method accessors) that cannot function without referenced assemblies being copied. When NCrunch detects a framework in use that requires this setting to be enabled, it will implicitly copy referenced assemblies to the workspace.

Unless you are experiencing problems using NCrunch, you should avoid enabling this configuration setting. When the Copy referenced assemblies to workspace setting is enabled, NCrunch must rebuild all upwards dependencies from the project that has changed. This has a very significant impact on build times within the solution as it requires NCrunch to build many more projects than it would otherwise be required to.

Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download