Daily Usage Issues

nCrunch appears to rebuild all projects when only a test project changes

Started by pdoran on 5,877 views

Background:
Visual Studio 2010
nCrunch 2.8.0.36


I noticed that the re-build time and analysis time has been taking a lot longer. It appears that when I make a change to a code file, most notably in a test project, all projects rebuild. I don't remember this being the case in the past. I have 58 projects and that means that each time I add a new unit test it is another 30-45 seconds before that test it picked up and run. I have the engine mode of Run Impacted Tests Automatically, Others Manually selected.
Hi, thanks for posting!

Waiting 30-45 seconds to see test discovery results is not normal and it should be possible to fix this.

The first thing you should check for is the use of the 'Copy referenced assemblies to workspace' setting. If you unhide all the warnings in the Tests Window, you will be notified of the use of this setting. It causes whole chains of projects to be rebuilt in the event of individual changes. You can learn more about this setting here - http://www.ncrunch.net/documentation/reference_project-configuration_copy-referenced-assemblies-to-workspace.

It's also worth taking a look at your normal VS build times for projects and comparing this with your NCrunch build times. It's usually fairly easy to get hold of your NCrunch build times by viewing the tasks in the Processing Queue. Check to make sure you don't have any particularly long running build steps. Code Contracts and Code Analysis are steps that can often take a long time to run and aren't always necessary.

If you have your 'Max number of processing threads' set to 1 and your solution contains long running tests, this may also create performance issues as the engine won't have enough resources to meet the demand.
The first setting did it! I found two projects that for some reason I had accidentally marked as Copy referenced assemblies. I changed those back to the default and now it behaves like the nCrunch I know and love! Thanks :)

Post a reply

Log in to reply.