Daily Usage Issues

nCrunchTemp_*csproj not cleaned up

Started by nikize on 12 views

Hi, being left with several of these files.
* How can I investigate why they are not deleted after use?
* Cleanup seems to itself trigger a regen and file recreation, maybe my way of trying cleanup but would still be nice to prevent regen on clean
* Any setting to clean up all these files if they happen to be leftover? I think that should be the default.
Hi, thanks for sharing this issue.

NCrunch creates these files temporarily when it loads your projects. If things are functioning normally, they should only exist for a few seconds at most.

There are known circumstances where the files can be left behind if the engine process is interrupted during project load (i.e. forcefully terminated etc). This is considered to be rare. If you're getting a mass accumulation of these files, it's worth investigating. How often do you need to clean them up? Are they left behind every time you start the engine?
Thanks, totally understand how they should work.

I shouldn't say that I see them in every solution I'm working with, but at least feels like several of them.
It becomes annoying when for example searching for things in csproj files in given directory, and there is mostly
nCrunchTemp_
files being listed, I then go to delete them, and they are "back right after"*
In some cases I have seen multiple files for the same project
* I usually run
rm -Recurse **/nCrunchTemp_*
but after posting I tried to verify and it turns out the files was not deleted at all.
Switching to
ls -Recurse ncrunchtemp_* | foreach {rm -Force $_ }


What worries me is the buildup of several files for the same project with legacy content. I understand the termination, several of the projects fails to build in one way or other, but in that case I assume they should still be cleaned up.
But nCrunch does sometimes get terminated since things just hangs, and a kill/restart is needed. But then I think it would be good if it is cleaned up on next run.
Actual suggestion scan thru and if there is any files leftover that is older than 2 minutes then they should probably be purged?

Trying to actually verify this, - so far no files left over, so maybe it was just my clean failing. so at least not left behind on every engine run.

But are there any logs for when these files are created and deleted and what might have failed in-between?
Thanks, yes I agree this is an annoying problem. It showed up a lot in the early days of the product, and it was maddening.

The cleanup of the files is within a try-finally block, so their deletion failure won't be because of a normal exception. NCrunch does keep logs but they are held in memory in the session, tend to be large and are hard to recover in a way that aligns with finding the files late after the problem has happened. You can examine the NCrunch logs by using the 'Submit Bug Report' option in the NCrunch menu, then clicking the Save to disk option.

I will most likely implement something to delete these files later when found. This does feel like we're working around something else though, it and seems prudent to understand why this is happening so frequently for you.

Do you have anything that might interfere with the engine process on your machine? A virus scanner perhaps? Anything that might forcefully terminate it? Do you get any weird errors when using NCrunch in general? Instability?

Post a reply

Log in to reply.