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

Visual Studio-2010Visual StudioVisual C++Intellisense

Visual Studio-2010 Problem Overview


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.

Visual Studio-2010 Solutions


Solution 1 - Visual Studio-2010

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.

Solution 2 - Visual Studio-2010

You can safely delete the file. Visual Studio will rebuild the file the next time the solution is opened.

Solution 3 - Visual Studio-2010

The short answer is yes, you can safely delete the .sdf file.

However, note that you can actually prevent VS from creating .sdf files in the first place by setting the following option to True:

Tools -> Options -> Text Editor -> C/C++ -> Advanced -> Disable Database

Solution 4 - Visual Studio-2010

for sake of completeness, you can safely delete:

  • *.sdf
  • Debug folders (usually at two levels)
  • ipch folder (c#)

Solution 5 - Visual Studio-2010

You can delete this local file, don't worry. The SDFwill be from your "xxxDBDataSet.xsd" file. if you change it, the SDF file also be new.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionkubal5003View Question on Stackoverflow
Solution 1 - Visual Studio-2010OzzahView Answer on Stackoverflow
Solution 2 - Visual Studio-2010Håvard SView Answer on Stackoverflow
Solution 3 - Visual Studio-2010SzabolcsView Answer on Stackoverflow
Solution 4 - Visual Studio-2010ingcontiView Answer on Stackoverflow
Solution 5 - Visual Studio-2010user1012506View Answer on Stackoverflow