2

I use Visual Studio IDE for C++ development.

I have set up the option of using a fallback location under Text Editor -> C/C++ -> Advanced -> Browsing Database Fallback where there are folders named BROWSE.VC-xxxx whose sizes reach into a couple of GBs that I routinely clean without affecting the functionality since they are generated again on rebuilding.

Additionally, I clean up the C:\Users\UserName\AppData\Local\Temp (%tmp%) folder routinely. This seems to also be suggested as an answer here. There is a rather old question whose accepted answer seems to indicate files/folders that should not be deleted for correct functioning of Visual Studio. Is there any comprehensive list of files/folders that can be safely deleted routinely? A search for clearing Visual Studio cache files seems to return a dizzying array of different flavored answers. See one such answer here.

In VSCode, for instance, there are cache files that can be deleted safely without affecting functionality in general (see discussion here), and in particular for C/C++ development, there are .ipch files that can be deleted (see discussion here). What are the equivalent files/folders under Visual Studio IDE?

Tryer
  • 3,580
  • 1
  • 26
  • 49
  • If you create a git repository (right-click the Solution ...) the generated `.ignore` rules file can be used to workout what can be deleted - this can be done on a temporary project as generated rules are static. Or if you create a git repo from your real project you can clone it into another folder which will just include the needed files. – Richard Critten Oct 02 '21 at 13:19
  • @RichardCritten What about cache files/temporary folders that Visual Studio could possibly place under some important folders like `c:/program Files/` etc. that are far removed from my local repository? Granted that my local repository project folder will contain *some* generated Visual Studio files (such as `.vs/`, `x64/` folder, etc.) that can be ignored. What about cache/temp files that are outside of my repository that are still generated *by* Visual Studio IDE? For instance, `%tmp%` folder could contain such files that are anyway outside of the repository. – Tryer Oct 02 '21 at 13:24
  • Just erase all Visual Studio files/folders. It is safe, but you cannot use VS anymore. You need more focus on your actual question, as the cached files are normally handled by VS itself and are erased when they are not needed anymore. – Luis Colorado Oct 04 '21 at 08:29
  • @LuisColorado Could you please provide any references for automatic VS's handling of these? – Tryer Oct 04 '21 at 10:47
  • well... not. I don't know about VS. But a cache is normally maintained by the program that created it, so erasing entries should make inconsistencies in the VS state. – Luis Colorado Oct 04 '21 at 15:12

0 Answers0