Edit $(IncludePath) “macro” in Visual Studio 2010

前端 未结 2 1684
遥遥无期
遥遥无期 2020-12-14 01:39

Visual Studio 2010 (\"Project Properties\" dialog)

I\'ve installed Visual Studio 2010 Ultimate and it has apparently imported the default directories for my Win32

相关标签:
2条回答
  • 2020-12-14 02:33

    In VS2010, these paths are specified in one or more property sheets (the respective changes are discussed in an instructive article on the VS Project Team Blog). You can add those yourself per-project, but the project also includes one specifying all the default values.

    On my system it is located in C:\Users\<user>\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props.

    You can access it from Visual Studio by opening the Property Manager window (View->Other Windows->Property Manager), and then doubleclick the property sheet. You can also add property sheets yourself from this window (which will take precedence over the default one).

    It is also perfectly legal to remove the reference to Microsoft.Cpp.Win32.user.props. That is useful if you need to ensure the project is entirely self-contained: that it doesn't get include paths from the environment, for example. Then you just have to specify the paths in the project itself, or in a custom property sheet that is part of the project (recommended for ease of reuse)

    0 讨论(0)
  • 2020-12-14 02:36
    1. VC++ Directories in VS2010 are project-specific. There are no global settings like in VS2008.
    2. There is INCLUDE environment variable which corresponds to $(IncludePath), so check it first.
    3. Formerly VS saved all global settings in Documents and Settings\\Local Settings\Application Data\Microsoft\VisualStudio\\VCComponents.dat so try to delete such file if it is present for all VS versions. I don't have such file for VS2010, but it's worth checking in your case.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题