Answered by:
Is it safe to delete "ipch" folder - Pre-compiled headers?

Question
-
Hello,
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? It's for an assignment hand in and I would like to keep the electronic hand in as small as possible. If I were to delete the folder will the application remain in a safe and stable state?
I apologise if this is a simple question, I have only just started using Visual Studio 2010.
Thanks!
- Moved by Brittany Behrens Tuesday, May 4, 2010 12:47 AM Believe .ipch files are generated by C++ (From:Visual Studio Editor)
- Moved by CoolDadTx Tuesday, May 4, 2010 1:43 PM C++ related (From:Visual C# IDE)
Sunday, May 2, 2010 9:06 PM
Answers
-
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.
- In the solution folder delete all bin, obj, ipch, debug and release directories.
- Delete any .suo files
- Delete any .user files
- Delete any .ncb files
- Delete any .sbr files
- Delete any .*log files (for VS 2010)
Zip up the entire solution directory for submission. This ensures that the solution and project structure remain intact.
PS I'll move the post to the C++ forums.
Michael Taylor - 5/4/2010
http://msmvps.com/blogs/p3net- Marked as answer by Jamie Keeling Tuesday, May 4, 2010 1:58 PM
Tuesday, May 4, 2010 1:42 PM
All replies
-
C# FORUM MODERATOR: Please move to C++ forum. Thank you!
Hi Jamie - I meant to move this to the C++ forum but mistakenly clicked C#. Unfortunately, I'm not a moderator of the C# forum and therefore can't move this to its intended location. Your best bet is to re-post this in the C++ forum at http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/threads. I'm very sorry for my error and the inconvenience.
Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter
Tuesday, May 4, 2010 12:54 AM -
No problem! I'll do it now.Tuesday, May 4, 2010 8:33 AM
-
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.
- In the solution folder delete all bin, obj, ipch, debug and release directories.
- Delete any .suo files
- Delete any .user files
- Delete any .ncb files
- Delete any .sbr files
- Delete any .*log files (for VS 2010)
Zip up the entire solution directory for submission. This ensures that the solution and project structure remain intact.
PS I'll move the post to the C++ forums.
Michael Taylor - 5/4/2010
http://msmvps.com/blogs/p3net- Marked as answer by Jamie Keeling Tuesday, May 4, 2010 1:58 PM
Tuesday, May 4, 2010 1:42 PM -
Excellent, thanks!Tuesday, May 4, 2010 1:58 PM
-
Here is a search that grabs the files and folders that need to be deleted.
Please backup your solution before trying this. I think it is safe, but I have not tested it over a long period of time. It worked fine for me and is based on the post by CoolDadTx and some personal experience.
Windows 7 file search
"Debug" OR "Results" OR "TestResults" OR "ipch" OR ext:ipch OR ext:suo OR ext:user OR ext:ncb OR ext:sbr OR ext:log OR ext:sdf
I believe I use the quotation marks for exact-match safety reasons. I once worked on a project that needed this; I think the devs had used the same folder names for other purposes). I omitted 'bin' and 'obj' because those are in Debug and Release for my projects. TestResults contains unit testing output. Regarding sdf...see http://social.msdn.microsoft.com/Forums/en-US/vcprerelease/thread/20fee924-e267-4c1a-b0fe-3321f86e1bb5.
Windows Search Advanced Query Syntax
http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/advquery.mspx
Tuesday, October 26, 2010 3:40 AM -
I too find the large support files (intellisense, pre-compiled headers) a bit disturbing. Fortunately you can change the location to which these files are stored. In Visual Studio 2010 go to Tools -> Options -> Text Editor (yeah I know, but that's the way it is) -> C/C++ -> Advanced and modify the Fallback Location section. This way:
- The project folder itself can stay relatively small.
- You can delete all support files in one go if necessary.
Thursday, May 19, 2011 3:30 PM -
- Delete any .sbr files
Looks like you can delete *.sdf files, too
Thursday, July 28, 2011 5:40 PM