Why Can't Visual Studio Find My Headers?

a_unique_name 401 Reputation points
2022-01-27T07:15:36.487+00:00

Hi Folks:

Developing on Windows 10 Pro, Visual Studio 2022 Community.

I've been doing debug builds with VS 2022 since I installed it about a month ago.

The first time I attempted a release build for my client to test, one directory's header files couldn't be found.

The project's property sheet has the first clue I'd like to investigate.

For the debug configuration:

Configuration Properties -> C/C++ -> General -> Additional Include Directories includes a reference to %(AdditionalIncludeDirectories).

168915-debug-property.png

The release configuration has no reference of %(AdditionalIncludeDirectories).

168837-release-property.png

Here's the debug property's Additional Include Directories' edit

168917-edit.png

The release property's Additional Include Directories edit makes no mention of %(AdditionalIncludeDirectories).

The two header file directories referenced in VC++ Directories are both empty.

Other header file directories are specified in .props files.

Release builds were working before I updated Visual Studio to 2022.

How do I get the project's release build property to reference %(AdditionalIncludeDirectories)?

The source of my problem might be something else, but this looks like a good place to start.

Thanks
Larry

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
0 comments No comments
{count} votes

Accepted answer
  1. Guido Franzke 2,196 Reputation points
    2022-01-27T07:50:48.69+00:00

    Hello,
    add %(AdditionalIncludeDirectories) to the include directory list in Release, so that it looks like the Debug line. (Or just copy the line in the Debug section and paste it in the Release section).
    Regards, Guido

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.