Export (0) Print
Expand All

Troubleshooting IntelliSense in C++ Projects 

IntelliSense can stop working under certain conditions. Use the following procedure to help determine why IntelliSense does not work for your C++ projects.

To approach IntelliSense failure in C++ projects

  1. Make sure your Visual C++ project contains no compilation errors.

    1. If your project is a Makefile project, see How to: Enable IntelliSense for Makefile Projects.

  2. Make sure that stdafx.h is in the include path. For more information about include paths in Visual C++ projects, see #include and /I.

  3. If your solution contains a combination of the Managed Extensions for C++ and the new syntax for managed C++, then separate your solution into multiple solutions based on the syntax type.

  4. If none of the preceding steps help resolve IntelliSense failure, then there might be an error in the .ncb file for your solution.

    1. Copy the .ncb file and contact product support services. For more information about how to contact Microsoft for technical support, see Getting Help from Microsoft Product Support Services (Visual Studio).

    2. Regenerate the .ncb file for your solution.

To regenerate .ncb files

  1. Delete the .ncb file from your solution.

  2. Rebuild your solution.

The development environment automatically regenerates a new .ncb file for your solution.

IntelliSense does not work in C++ projects under the following circumstances:

  • The cursor is inside a code comment.

  • You are writing a string literal.

  • A syntax error appears above the cursor.

  • IntelliSense is not fully supported under the following circumstances:

  • When you reference a header file multiple times using the #include directive, and the meaning of that header file changes due to various macro states (which are defined through the #define directive). In other words, when you include a header file several times whose usage changes under different macro states, IntelliSense will not always work.

Community Additions

ADD
Show:
© 2014 Microsoft