Does this means NCrunch is actually using binaries from directory "1" even though it has an old modified date?
If this is a "bug" or "by design" to not clean directories unless vstudio is restarted, can I somehow make assumptions on which directories are safe to remove on regular basis? (e.g. only keep the last 20 or similar)
NCrunch will clean out directories in the following situations:
- When a project within the solution is changed (must be a .proj file, not just one of the code files in the project, and all workspaces related to this project will be removed and replaced as needed)
- When a project is removed from the solution
- When NCrunch is disabled/reset
- About 10 seconds after VS is shutdown (you'll notice a small NCrunch .exe running after shutdown to perform this action cleanly when it can be sure nothing is touching the files)
- After initialisation of VS - in the event that VS wasn't shut down correctly and derelict workspaces may be present
NCrunch will build workspaces as it needs them. Basically, when the engine needs to perform a task, it will check for an existing workspace that has been pre-created for the applicable project. If the workspace doesn't exist or all existing workspaces are in use (for example, if tests or builds are still running against them), then a new workspace is built. In this way, you'll notice that the number of workspaces will steadily increase over time until it reaches a maximum optimal level that is determined by your NCrunch configuration.
It is not safe to delete any workspaces while the engine is running, as each workspace is individually tracked and may be reused at any time.
If you're experiencing problems with disk space consumption, you can reduce the number of workspaces needed by NCrunch by adjusting the engine to perform less work concurrently. This can be done by adjusting the Max number of processing threads and Max test runners to pool configuration settings.
Remco wrote:...
NCrunch will build workspaces as it needs them. Basically, when the engine needs to perform a task, it will check for an existing workspace that has been pre-created for the applicable project. If the workspace doesn't exist or all existing workspaces are in use (for example, if tests or builds are still running against them), then a new workspace is built. In this way, you'll notice that the number of workspaces will steadily increase over time until it reaches a maximum optimal level that is determined by your NCrunch configuration.
...
Hrm then maybe some sort of option "max disk space used" that would make NCrunch automatically to perform some cleanup can be considered?
(I have set my RamDisk to be 1.2GB, after executing "resynchronize" NCrunch I get 850MB available. So in 2 days NCrunch has eat up these 850MB. So instead of having to resynchronize manually when I see disk space is running low I would appreciate if NCrunch took care of it).