locked
How to restore VC++ Directories to defaults RRS feed

  • Question

  • I have a solution with multiple subprojects. When I right-click to bring up Properties on any of the projects, and select "Configuration Properties > VC++ Directories", the directories are already filled in with various macro defaults:

    However, on just one of the projects, the directories are all blank. How can I get these to the same set of default paths?

    • Moved by Baron Bi Monday, June 5, 2017 8:02 AM
    Wednesday, May 17, 2017 9:40 PM

All replies

  • Hi kenk77,

    thanks for posting here.

    >>However, on just one of the projects, the directories are all blank. How can I get these to the same set of default paths?

    What's the type of this project? Did you create it properly?

    If you want to set to the default paths, you could edit each directories value, choose Inherit from parent or project defaults. For example:

    Hope this could be help of you.

    Best Regards,
    Sera Yu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Guido Franzke Thursday, May 18, 2017 6:42 AM
    • Unproposed as answer by kenk77 Tuesday, May 23, 2017 5:42 PM
    Thursday, May 18, 2017 1:51 AM
  • The "Inherit from parent" is already selected, but that won't help because the dialog shows that there are no inherited values:

    Thursday, May 18, 2017 4:32 PM
  • Where do the default set of "Inherit from parent or project defaults" paths come from?

    How can I reconnect those defaults back to my subproject? How did they get lost in the first place?

    Tuesday, May 23, 2017 5:45 PM
  • >>Where do the default set of "Inherit from parent or project defaults" paths come from?

    How can I reconnect those defaults back to my subproject? How did they get lost in the first place?

    Here is the list of the settings in VC++ Directories Property Page.

    Executable Directories
    Corresponds to the PATH environment variable.

    Include Directories
    Corresponds to the INCLUDE environment variable.

    Reference Directories
    Corresponds to the LIBPATH environment variable.

    Library Directories
    Corresponds to the LIB environment variable.

    Hope this could be help of you.

    Best Regards,

    Sera Yu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 24, 2017 9:05 AM
  • My question is, in the first screen shot, you can see the directories have values, for example:

    Include Directories:    $(VC_IncludePath);$(WindowsSDK_IncludePath);

    but in my second screen shot, for just one specific project in the solution, the directories are all blank.

    Why are they blank, and how can I restore the directories to the same pre-filled-in values as all of the other projects in my solution?

    Is there something in the .sln file, or something in the .vcxproj file, that tells that specific project to ignore the parent default directories?

    Wednesday, May 24, 2017 5:13 PM
  • >>Is there something in the .sln file, or something in the .vcxproj file, that tells that specific project to ignore the parent default directories?

    Which type is this project? Did you create this project properly?

    These settings are inherited from default settings of the MSBuild CPP Toolset in C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.Default.props, which is imported by the .vcxproj file. The project template import Microsoft.cpp.default.props, which defines some basic, toolset-independent properties when you create a project.

    Here is a document about Project Properties for you as a reference.

    https://msdn.microsoft.com/en-us/library/669zx6zc.aspx

    Hope this could be help of you.

    Best Regards,

    Sera Yu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Baron Bi Thursday, June 1, 2017 9:07 AM
    Thursday, June 1, 2017 9:07 AM
  • It is a Native C++ Unit Test project, and I used the wizard in VS to create the project.
    Thursday, June 1, 2017 5:18 PM
  • >>It is a Native C++ Unit Test project, and I used the wizard in VS to create the project

    For this case, I will move it to VS unit testing forum for better support.

    Your understanding and cooperation will be grateful.

    Best Regards,
    Sera Yu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 2, 2017 2:58 AM
  • Hi friend,

    Which version of Visual Studio IDE in your side?

    I check both VS2015 and VS2017, when I try to set VC++ Directories in tools, it shows me this:

    then I click the question mark, I get this page:

    https://docs.microsoft.com/en-us/cpp/ide/vcpp-directories-property-page

    which mentioned how to edit the directories value in properties of project.

    As the configuration has been deprecated, apparently it also say it's been set by default. So I wonder how you got the project with the blank values or how i could repro it in my end. I also added Native unit test in the solution explorer(both under vs2015 and vs2017), but they both show the directories path values by default jus like below:

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, June 6, 2017 6:12 AM