V4 Documentation

Custom Build Properties

Project-level NCrunch configuration setting Introduced: v3.18
ID/Tag in config file: CustomBuildProperties


Custom build properties that are specified using this value will be passed into MSBuild by NCrunch when it builds the project in a background workspace.

These properties will also be used by MSBuild when NCrunch is first loading the project, during initialisation of the engine.

The behaviour of MSBuild when applying these properties is identical to the '/p:Property=Value' command line parameter that can be used to inject properties when using MSBuild.exe outside of NCrunch.

When a property of the name 'TargetFramework' or 'TargetFrameworks' is supplied using this setting, NCrunch will assume this to be the TargetFramework for the project (overriding anything declared in the project file) and will use the value when splitting the project across framework dimensions.


You can use this configuration setting to override behaviour inside the NCrunch build system without needing to modify your project files.

It is also possible to introduce alternative behaviour inside your project files and build system by using the 'NCrunch' = '1' environment variable. However, this configuration setting can be a cleaner option as NCrunch-specific logic may not need to be coded into your project files.

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