Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are these .pch and .ncb files in visual studio?

Tags:

I have several small Visual Studio Projects (C++). And many of these projects have .ncb and .pch extension files. Those files are quite big, and they are consuming a lot of space (over 100 mb).

What are these files?

If those files are not that important can I delete them? Can I stop them from being created?

like image 418
Victor Avatar asked Feb 11 '12 14:02

Victor


Video Answer


2 Answers

PCH is the precompiled headers file. It's a temporary that you can safely delete. You can disable its creation through Project Settings > C++ > Precompiled Headers > Don't use precompiled headers and removing the stdafx.cpp file from your project.

NCB is the database used by IntelliSense to allow you to browse the symbols defined in your project, including the inline hints and auto completion as you type. You can safely delete it. There is an option to disable IntelliSense too.

However, both features may be useful; therefore you may not want to disable them. If you worry about the size of the backups or sending the projects to some other programmer, then you can just clean the project by removing said files.

like image 106
Yakov Galka Avatar answered Oct 26 '22 11:10

Yakov Galka


pch = pre-compiled header
ncb = non-compiled browse

The files are pretty important if you want to use the features they support. Not using pre-compiled headers will get rid of the first one. Don't know about the code browse support.

like image 31
Bo Persson Avatar answered Oct 26 '22 09:10

Bo Persson