I'm aware that ncrunch pauses execution if the instance of VS it's running inside starts a build task, but I was wondering whether there was any way to force it to pause from an external build? I have a system which uses a number of related solutions, all of which build to a common location to be referenced from. I have a "build everything" script which builds one solution at a time. If any of the solutions are open in Visual Studio, ncrunch notices that the dependencies of the current solution are updated and kicks off another test run, which slows down the main build process.
I'm not sure exactly how anything like this would work - perhaps the presence of a file to indicate build in progress (obviously has potential issues for cancelled builds where any "lock" file doesn't get removed). Perhaps this is something which has already been thought of but I'm just not aware of how it's implemented?
Remco NCrunch Developer
#15500
03 Jul 2021 00:58 UTC
Hi, thanks for posting.
NCrunch monitors for VS builds via an in-process event. We don't have anything in NCrunch that can be used to create the kind of behaviour you are after ... but there may still be a way to get what you want, depending on what your script is doing.
Under normal circumstances, a build of the solution should not trigger NCrunch. This is because NCrunch is only supposed to listen to changes in the projects that would require them to be rebuilt. It may be that your script is making an avoidable file system change that NCrunch is responding to unnecessarily.
Try turning on your 'Log to output window' setting, and set your 'Log Verbosity' to 'Medium'. Keep your NCrunch VS output window open so you can watch the logs, and try running your background build script. NCrunch should report in the log which files it's reacting to. Knowing what is triggering NCrunch may give you opportunities to prevent the triggering entirely.
NCrunch monitors for VS builds via an in-process event. We don't have anything in NCrunch that can be used to create the kind of behaviour you are after ... but there may still be a way to get what you want, depending on what your script is doing.
Under normal circumstances, a build of the solution should not trigger NCrunch. This is because NCrunch is only supposed to listen to changes in the projects that would require them to be rebuilt. It may be that your script is making an avoidable file system change that NCrunch is responding to unnecessarily.
Try turning on your 'Log to output window' setting, and set your 'Log Verbosity' to 'Medium'. Keep your NCrunch VS output window open so you can watch the logs, and try running your background build script. NCrunch should report in the log which files it's reacting to. Knowing what is triggering NCrunch may give you opportunities to prevent the triggering entirely.
Post a reply
Log in to reply.