- Overview
- Guides
- Concepts
- Considerations And Constraints
- Absolute File References
- Assembly Colocation Assumptions
- Concurrent Use Of Test Resources
- Cross Application Domain Testing
- Heavily Executed Code Under Test
- Implicit File Dependencies
- Multi Threaded Tests
- Netstandard Test Projects
- Project Atomicity
- Project Build Platform And Configuration
- Rdi Data Point Location
- Test Atomicity
- Unique Test Names
- Using NCrunch With Source Control
- Reference
- Global Configuration
- Overview
- Auto Adjust Clashing Marker Colours
- Build Log Verbosity
- Build Process Memory Limit
- Capabilities Of This Computer
- Coverage Marker Style
- Cpu Cores Assigned To NCrunch Or Ide
- Custom Environment Variables
- Disable Global Hotkey
- Engine Hosting Strategy
- Fast Lane Threads
- Fast Lane Threshold
- Grid Maximum Reconnection Attempts
- Grid Reconnection Delay
- Impact Detection Mode
- Listening Port
- Log To Output Window
- Logging Verbosity
- Marker Colours
- Max Failing Test Trace Log Size
- Max Number Of Processing Threads
- Max Passing Test Trace Log Size
- Max Test Runners To Pool
- NCrunch Tool Window Colors
- Node Id (Name)
- Password
- Performance Aggregation Type
- Performance Display Sensitivity
- Pipeline Optimisation Priority
- Rdi Storage Settings
- Sliding Build Delay
- Snapshot Storage Directory
- Solution Storage Data Limit
- Spinner Colours
- Terminate Test Runners On Complete
- Test Process Memory Limit
- Tests To Execute On This Machine
- Text Output Font
- Workspace Base Path
- Solution Configuration
- Overview
- Additional Files For Grid Processing
- Additional Files To Include
- Allow Parallel Test Execution
- Allow Tests In Parallel With Themselves
- Infer Project References Using Assembly
- Instrumentation Mode
- NCrunch Cache Storage Path
- Only Consider Tests Outofdate If Impacted
- Project Config File Storage Path
- Show Coverage For Tests
- Show Metrics For Tests
- Tests To Execute Automatically
- Project Configuration
- Overview
- Additional Files To Include
- Allow Dynamic Code Contract Checks
- Allow Static Code Contract Checks
- Analyse Line Execution Times
- Autodetect Nuget Build Dependencies
- Build Priority
- Build Process Cpu Architecture
- Build Sdk
- Collect Control Flow During Execution
- Consider Inconclusive Tests As Passing
- Copied Project Dependencies
- Copy Referenced Assemblies To Workspace
- Custom Build Properties
- Data Storage File Size
- Default Test Timeout
- Detect Stack Overflow
- Enable Rdi
- Files Excluded From Auto Build
- Framework Utilisation Types
- Ignore This Component Completely
- Implicit Project Dependencies
- Include Static References In Workspace
- Instrument Output Assembly
- Method Data Limit
- Ms Test Thread Apartment State
- Preload Assembly References
- Prevent Signing Of Assembly
- Proxy Process File Path
- Rdi Cache Size
- Required Capabilities
- Restrict Tostring Usage
- Run Pre Or Post Build Events
- String Length Limit
- Track File Dependencies
- Use Build Configuration
- Use Build Platform
- Use Cpu Architecture
- Runtime Framework
- Overview
- Atomic Attribute
- Category Attribute
- Collect Control Flow Attribute
- Distribute By Capabilities
- Duplicate By Dimensions
- Enable Rdi Attribute
- Environment Class
- Exclusively Uses Attribute
- Inclusively Uses Attribute
- Isolated Attribute
- Method Data Limit Attribute
- Requires Capability Attribute
- Restrict Tostring Attribute
- Serial Attribute
- String Length Limit Attribute
- Timeout Attribute
- Uses Threads Attribute
- Global Configuration
- Troubleshooting
- Tools
- Keyboard Shortcuts
- Manual Installation Instructions
Implicit Project Dependencies
Project-level NCrunch configuration setting Default Value: (none)ID/Tag in config file: ImplicitProjectDependencyPathsRelativeToSolutionDirectory
Purpose
This configuration setting specifies a list of projects that a project depends on, but are not specified as references in the project file.
NCrunch normally identifies the references between projects by examining the ProjectReference elements inside the project build XML. This means that cross-project references not specified in this way are not considered by NCrunch and can only be identified through the use of this configuration setting.
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.
During test execution, it is possible to retrieve the file paths of implicitly referenced assemblies using the environment class.
Recommendations
You can use this configuration setting to work around issues caused by NCrunch's workspacing. If your solution contains code that dynamically loads referenced assemblies or builds custom application domains/processes from unreferenced projects, this setting allows you to inform the NCrunch engine of implicit dependencies and the environment class allows you to find these dependencies at runtime.
Because other test runners do not support the implicit reference data used by NCrunch, it is recommend only to make use of this configuration setting as a workaround that is specific to NCrunch's test environment. You can implement alternative logic for other test runners using NCrunch specific overrides.
Example
If you have an x64 test library that needs to launch an x86 console application that is output from another project in the solution, there is no normal way to find the location of the x86 console .exe inside NCrunch's workspaces. When tests within the x64 environment are executing, they cannot locate the .exe because the NCrunch workspace containing it is stored in a undetermined location.
The normal solution to this problem would be to introduce a project reference from the x64 project to the x86 project (or a test project referencing both), then rely on the CLR's loading of referenced assemblies to find the location of the x86 .exe (for example, using typeof(ClassWithin32BitAssembly).Assembly.Location). Unfortunately, A reference cannot be created from the x64 project to the x86 project, because this would cause an InvalidProgramException to be thrown inside the test environment as soon as the CLR attempts to resolve the x86 assembly.
This configuration setting provides an alternative approach. When an implicit reference is created from the x64 project to the x86 project, it is possible to make a call to NCrunchEnvironment.GetImplicitlyReferencedAssemblyLocations() to find the location of the x86 .exe.