Documentation

Documentation
V5 Documentation

Copied Project Dependencies

Project-level NCrunch configuration setting Default Value: (none)
ID/Tag in config file: CopiedProjectDependencyPathsRelativeToSolutionDirectory
Introduced: v4.9

Purpose

This configuration setting specifies a list of projects that a project depends on and expects to have copied to its build output directory, but cannot be specified as references in the project file.

The primary purpose of this setting is to allow NCrunch to work with projects that rely on native DLLs built from other projects that are part of the same solution.

When a project reference is specified using this setting, the NCrunch engine will consider the reference as part of its build dependency tree and will not build the referencing project until the referenced project has been built.

This setting is very similar to the implicit project dependencies setting. The difference is that projects targeted by this setting will have their output files copied to the build output directories of projects that reference them, instead of declaring assembly references inside the build system. Thus this setting can be used to map native project references into NCrunch where other settings and build logic cannot.

Recommendations

References from .NET projects to native C/C++ projects are difficult to structure in Visual Studio and MSBuild. The build system does not support introducing a project reference from a .NET project directly to the native project, so the usual pattern is to instead reference the native DLL directly from its build output directory, then define build order rules to ensure the native project is built first. Such a structure does not work under NCrunch due to its own handling of the build system. This setting provides a workaround to allow NCrunch to understand the native reference and handle it accordingly.

Note that using this setting will have a similar effect on build performance as enabling the copy referenced assemblies to workspace setting.

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