92

I am finding an ipch folder in my project whose files are having an ipch extension. Plus, they are quite voluminous.

Can I get rid of them?

MelMed
  • 1,702
  • 5
  • 17
  • 25
  • 4
    Yes but they'll come back when you next build. This is the new place for precompiled headers. – Roger Rowland Oct 16 '13 at 08:14
  • 1
    possible duplicate of [Is it safe to delete the "ipch" folder - Precompiled headers?](http://stackoverflow.com/questions/2757402/is-it-safe-to-delete-the-ipch-folder-precompiled-headers) – gbjbaanb Oct 16 '13 at 08:18

2 Answers2

126

That is the precompiled headers file that is used by the IntelliSense parser. Distinct from the precompiled header file that the compiler generates when you build your project, that's a .pch file in your build output directory. It otherwise plays the exact same role, it greatly increases the speed of the parser. It can use that kind of help, the EDG front-end has never been particularly fast.

Deleting them is fine, they are only used when you have the project loaded in the IDE. If you reload the project then IntelliSense is going to be catatonic for a while, rebuilding the .ipch file, re-parsing the files in the project and recreating the .sdf file in the project directory. On large projects that can easily take a handful of minutes. Of course, the bigger the .ipch file, the longer that will take. It is something you'd normally only contemplate after you finished a project.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
30

You can't change location of ipch file on persolution basis, but you can do it for whole VS installation. For this you need to change Always Use Fallback Location in Tools>Options to true. After this you can delete ipch folder from your solution's folder and it will not appear there again.

enter image description here

You can read a bit more here

Yola
  • 18,496
  • 11
  • 65
  • 106