Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it safe to delete the "ipch" folder - Precompiled headers? [duplicate]

I was looking through the folder for an application I am working on and noticed the "ipch" folder, for my solution which has two small projects it weighs in at about 90mb+ in size.

I have found an article discussing the use for the files and was wondering if they were safe to delete? I would like to keep the applications footprint as small as possible. If I were to delete the folder will the application remain in a safe and stable state?

Pre-Compiled Headers

like image 796
Jamie Keeling Avatar asked May 03 '10 10:05

Jamie Keeling


People also ask

Can I delete IPCH folder?

I'm not only a C# moderator but also a C++ user :} The ipch directory and the many, many new files generated by the compiler can be safely deleted. In fact they should be deleted (and probably are) for clean builds.

What are IPCH files?

Developer file used by Microsoft Visual C++, an IDE used for Windows C++ programming; contains precompiled header information used by Intellisense, Microsoft's code assistance module used for code hinting, documentation, and autocompletion while the programmer types source code.

Why is .VS folder so big?

vs folder takes almost 5GB space and a big problem when taking backup or comparing folders. This is due to visual studio "Intellisense" feature doing some covert logging to augment our sense.


4 Answers

Managed to find a pretty informative answer from the MSDN support forums:

I'm not only a C# moderator but also a C++ user :} The ipch directory and the many, many new files generated by the compiler can be safely deleted. In fact they should be deleted (and probably are) for clean builds. I teach a C++ college class myself and here is what I require my students to do.

1.In the solution folder delete all bin, obj, ipch, debug and release directories.

2.Delete any .suo files

3.Delete any .user files

4.Delete any .ncb files

5.Delete any .sbr files

6.Delete any .*log files (for VS 2010)

I've had no issues following the given steps.

(Source and original post)

Update:

raphinesse has also linked to a question which states that the .SDF file can be removed safely as well.

like image 161
Jamie Keeling Avatar answered Oct 18 '22 11:10

Jamie Keeling


I was bothered by my 'ipch' folder and deleted it. When you open the project again the 'ipch' folder is recreated. Runs just like before.

like image 21
glr Avatar answered Oct 18 '22 12:10

glr


Yes, it is safe - all that is in this gitignore file is safe to remove: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

like image 5
canesin Avatar answered Oct 18 '22 10:10

canesin


There are a number of files that Visual C++ uses temporarily that can freely be deleted. Most of them will automatically be recreated the next time you load the project, while the others will be regenerated the next time you build your project.

I have found the need to prune these files out for zipping and sharing online, so I wrote this utility for pruning the temporary files.

In direct answer to the question, the answer is yes.

like image 4
Serapth Avatar answered Oct 18 '22 12:10

Serapth