Visual Studio 2010 - C++ project - remove *.sdf file

kubal5003 picture kubal5003 · Oct 10, 2011 · Viewed 87.9k times · Source

I would like to know if I can safely delete the sdf file that stores information for Visual Studios Intellisense - is it going to be rebuilt the next time that I open the solution?

Do I lose anything by doing so? Is it possible to break the solution this way?

The motivation to do so is that by having multiple small projects stored - each and every sdf file is more or less 20Mb in size which adds up to a noticeable amount of disk space.

Answer

Ozzah picture Ozzah · Oct 10, 2011

You can safely delete the .sdf file and ipch folder but you can also stop VS from putting those files in the project folder in the first place. (Useful if you have your source in an SVN or other synchronised folder, or if you store your project on a small volume like a USB stick or SSD and you don't want those large files stored in the same folder)

Go to Tools -> Options -> Text Editor -> C/C++ -> Advanced

In the "Fallback Location", set "Always Use Fallback Location" to True and "Do Not Warn If Fallback Location Used" to True.

In "Fallback Location" you can either put a path like C:\Temp or if you leave it blank then VS will use the temporary directory in your AppData folder.