Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent visual studio creating browse info (.ncb) files

Is there a way to prevent VS2008 creating browse info file files for C++ projects.
I rarely use the class browser and it isn't worth the time it takes to recreate it after every build, especially since it runs even if the build failed.

EDIT - it's also needed for go to declaration/definition

like image 978
Martin Beckett Avatar asked Sep 25 '08 20:09

Martin Beckett


3 Answers

In the project properties, you will find the browse information under:

Configuration Properties -> C/C++ -> Browse Information

Just tell it not to generate browse information. All it is used for is quickly browsing between code components (like using 'Go to Definition') and so forth. I personally like being able to quickly jump between the components, but if it is adding unnecessary time to your compile don't worry about turning it off.

like image 163
Jordan Parmer Avatar answered Oct 05 '22 10:10

Jordan Parmer


There is a registry key for this as well: [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Languages\Language Services\C/C++]

Intellisense ON

"IntellisenseOptions"=dword:00000000

Intellisense OFF

"IntellisenseOptions"=dword:00000007

Intellisense ON - NO Background UPDATE

"IntellisenseOptions"=dword:00000005

More flags are available and you can Control Intellisense through Macros as well.

ISENSE_NORMAL = 0       'normal (Intellisense On)
ISENSE_NOBG = &H1       'no bg parsing (Intellisense Updating Off - although NCB file will be opened r/w and repersisted at shutdown)
ISENSE_NOQUERY = &H2    'no queries (don't run any ISense queries)
ISENSE_NCBRO = &H4      'no saving of NCB (must be set before opening NCB, doesn't affect updating or queries, just persisting of NCB)
ISENSE_OFF = &H7       
like image 25
Adisak Avatar answered Oct 05 '22 09:10

Adisak


Try creating a folder with the same name of the ncb file (you'll have to delete the file, of course). I used this trick in the past to prevent intellisense from locking VS2005. You'll lose intellisense, though.

like image 31
Leandro Oliveira Avatar answered Oct 05 '22 09:10

Leandro Oliveira