Friday, July 23, 2010

Visual Studio and your AppData\Temp directory

Visual Studio has a tendency to leave a lot of junk files behind when you cancel builds. A colleague of mine at DICE had 22,000 temp files weighing in at over 14.5 GB in his AppData\Temp directory! Having more than a few hundered files in a single directory on NTFS is suicide, so you can imagine how much his compile times improved when he emptied that directory.

The real question is how to get Microsoft's CL to stop creating these temporary files, and failing that, how to make it clean them up when you abort it?

In the meantime, I'm relying on a little tool I have running on a schedule that wipes files that are older than a few days from my AppData\Temp directory. Lo-fi solution to a yucky problem.

3 comments:

jamiebarrow said...

I feel the frustration; I too just noticed a lot of TMP files and folders that seem to be related to Visual Studio. Did you find anything that can be used to stop it?

Unknown said...

Well, you can have a better solution to your problem. Looking forward for your next post.



Racks and UPS

Unknown said...

Clean Junk files in C Drive with CCleaner