47

I saw that VS2010 creates some files in the solution folder(.sdf, .suo, .ipch, etc). Is it possible to change the folder where these files are created?

Thanks!

Mircea Ispas
  • 20,260
  • 32
  • 123
  • 211

1 Answers1

82

The ipch folder is created by the IntelliSense system and it's location cannot be changed on a per-solution basis. However, you can have VS 2010 store all of your projects' ipch folders in your %TEMP%\VC++ folder. Select Tools > Options > Text Editor > C/C++ > Advanced. Once there, you'll see a Fallback Location section. Change Always Use Fallback Location to True. Leave Fallback Location blank and it will put them in your %TEMP% folder. Once you've changed that, you can remove your ipch folder and your *.sdf & *.opensdf files. They will be recreated in the fall-back location. Note, you may want to backup those files if you're picky about the window layout, etc for the project.

I learned this from this MSDN Blog Post. Also note that a *.suo file will still be created in the same location as your solution. I'm not sure how to change that.

alyawn
  • 955
  • 7
  • 9
  • 1
    I did what you suggested and it did not work, possibly because my temp folder is on a ramdisk formatted with FAT32. (upon startup visual studio was popping up a message saying intellisense would not be available due to inability to create some file there.) I specified the fallback location to be C:\ and this got rid of the error message, but nothing new showed up on the root of my drive C:. A search for *.ipch yields nothing. The build is very fast though, which probably means that the precompiled header file is being used. I am totally confused. – Mike Nakis May 17 '13 at 17:29