none
Visual Studio 2010 Professional -- How to add include directory for all projects??

    Question

  •  

    Hi, all:

     

    I'm trying to add some "include" directories for all my projects. 

    Tools->Options->Projects and Solutions->VC++ Directories...

    I got the following information:

    VC++ Directories editing in Tools > Options has been deprecated.

    VC++ Directories are now available as a user property sheet that is added by default to all projects. Please click '?' for more information.

     

    But, I couldn't find '?' to give me more information. What's more, I tried to use

    View->Property Manager 

    to add "include" directories, but this seems to work for a single project, rather than all projects.

     

    So, can anybody give me a hand?

     

    Cheers

    JIA

     


    Welcome to Vision Open http://www.visionopen.com
    Wednesday, March 31, 2010 1:11 AM

Answers

  • You can also take a look of this blog: http://blogs.msdn.com/vcblog/archive/tags/Migration/default.aspx

    There is a section about VC++ directory changes in VS2010:

    VC++ Directories change

    VC++ Directories are no longer supported in VS2010 through Tools->Options page. Instead, VS2010 introduces the user settings file (Microsoft.cpp.<Platform>.users.props) to control global settings including Global search path. These files are located at $(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0 directory. Upon migration to VS2010, the custom settings of VC++ Directories from VS2005 or VS2008 are migrated to these user files. These global settings files are imported into all the converted and newly created projects.

     

    Here are the steps to change the settings file through UI:

    ·         Open up property manager by clicking on View.Property Manager.

    ·         Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp.<Platform>.users" file for each Configuration|Platform. These are the files for the global settings, similar to the old tools/Options/VC++ Directories.

    ·         Multi-Select "Microsoft.cpp.<Platform>.users", right click and bring up the property page window

    ·         In the property page window, click on "VC++ Directories" (for example) in the left pane, add new paths for the directories such as "Include Directories". separated by semicolons

    ·         Make sure to save the settings before shutting down Visual Studio.

    ·         Re-launch Visual Studio and the new settings will be in effect.

    -Note: If you would like to only change the settings for one project, you can right click on the project and bring up the property page. Change the settings for “VC++ Directories”, these settings will be persisted to the project file.


    Li Shao
    • Marked as answer by Nancy Shao Wednesday, April 07, 2010 3:13 AM
    Wednesday, March 31, 2010 2:20 AM
  • The setting has been moved into a property sheet. There are dozens of blog articles about it. Here's one, google for more if this one isn't sufficient: http://blogs.msdn.com/vsproject/archive/2009/07/07/vc-directories.aspx
    • Marked as answer by Nancy Shao Wednesday, April 07, 2010 3:13 AM
    Wednesday, March 31, 2010 1:30 AM

All replies

  • The setting has been moved into a property sheet. There are dozens of blog articles about it. Here's one, google for more if this one isn't sufficient: http://blogs.msdn.com/vsproject/archive/2009/07/07/vc-directories.aspx
    • Marked as answer by Nancy Shao Wednesday, April 07, 2010 3:13 AM
    Wednesday, March 31, 2010 1:30 AM
  • You can also take a look of this blog: http://blogs.msdn.com/vcblog/archive/tags/Migration/default.aspx

    There is a section about VC++ directory changes in VS2010:

    VC++ Directories change

    VC++ Directories are no longer supported in VS2010 through Tools->Options page. Instead, VS2010 introduces the user settings file (Microsoft.cpp.<Platform>.users.props) to control global settings including Global search path. These files are located at $(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0 directory. Upon migration to VS2010, the custom settings of VC++ Directories from VS2005 or VS2008 are migrated to these user files. These global settings files are imported into all the converted and newly created projects.

     

    Here are the steps to change the settings file through UI:

    ·         Open up property manager by clicking on View.Property Manager.

    ·         Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp.<Platform>.users" file for each Configuration|Platform. These are the files for the global settings, similar to the old tools/Options/VC++ Directories.

    ·         Multi-Select "Microsoft.cpp.<Platform>.users", right click and bring up the property page window

    ·         In the property page window, click on "VC++ Directories" (for example) in the left pane, add new paths for the directories such as "Include Directories". separated by semicolons

    ·         Make sure to save the settings before shutting down Visual Studio.

    ·         Re-launch Visual Studio and the new settings will be in effect.

    -Note: If you would like to only change the settings for one project, you can right click on the project and bring up the property page. Change the settings for “VC++ Directories”, these settings will be persisted to the project file.


    Li Shao
    • Marked as answer by Nancy Shao Wednesday, April 07, 2010 3:13 AM
    Wednesday, March 31, 2010 2:20 AM
  • To change global (not per project) settings for, say, include files, I need to open any project (if I have no projects, I need to create one to change global settings!?) - who's idea it was? ;-)
    Thursday, April 29, 2010 4:35 AM
  • My problem was different: I installed the DirectX SDK after installing VS2010beta and the include and library directories for that were not installed in any sort of global path.  Now I have wasted several hours chasing down something that MS should have done.

    Thanks a lot, Microsoft

    Sunday, May 30, 2010 4:51 PM
  • Installing the include/lib paths for external libs in the global search path, this does not seem to be a feature that Visual Studio have supported before. Correct me if I am wrong on this. This, however, does seem to be a nice feature to have.

    Li Shao, MSFT


    Li Shao
    Monday, June 07, 2010 4:08 AM
  • WhereTF is View.Property Manager in Visual Studio 2010, please stop refering to links just post if you have something new to say. Thanks
    Thursday, October 21, 2010 4:57 PM
  • View -> Other Windows -> Property Manager
    Thursday, October 21, 2010 5:17 PM
  • Please someone has to wake up at Microsoft. You want to change your path/lib settings and where do you have to look:

    in view>other windows > property manager

    You ought to be kidding me! No wonder I couldn't find it. Also great help in the program: it is deprecated click help (gives no help).

    Wednesday, April 27, 2011 9:26 AM
  • No kidding... this is nuts.

    Why do I need to chase down through so many windows and drop downs just to change a freaking include path??

    Is all this obfuscated functionality supposed to help me develop faster?!

    I swear I would use linux/g++ in a freaking heart beat if the stupid dll's i needed were released in anything but for Windows...

    VSC++... what a terrible system...

     

    in Windows Hell

    -Thek Peterson

    Wednesday, June 29, 2011 3:44 PM
  • Even better - I DO NOT have this menu pick on my vs2k10 system. WTF is this stupid menu?
    #include "witty signature.h"
    Wednesday, August 10, 2011 6:50 PM
  • The old "view -> options -> property manager" is now simply "view -> property manager"

    I had to re-read Li Shao's original post on this to find where this information is buried. Frighteningly enough, that is the correct answer. Thank FSM for google indexing this site or I'd never been able to find this information.

    Wednesday, August 10, 2011 6:55 PM
  • Is there an easy way to multi-select that "Microsoft.cpp.<Platform>.users" thingy for all projects in a solution? I'm trying to compile the ACE / TAO libraries, and there are several hundred projects in that solution. I don't want to have to right-click every single one of those projects. :-\
    Wednesday, November 02, 2011 5:54 PM
  • The IDE is scriptable, no? It should be possible to type in the command window something like: foreach project in solution.projects  project.IncludePaths +=...  ?  

    (variant with a property sheet: project.PropertySheets += "foo.props" )

    -- pa



    • Edited by Pavel A Wednesday, November 02, 2011 11:12 PM
    Wednesday, November 02, 2011 11:07 PM
  • you should try

    project->property->configuration property->VC++ Directories

    Tuesday, November 29, 2011 1:55 PM
  • That only changes that project's settings. 

    The overriding issue is that we as engineers shouldn't have to be bogged down with engineering the tool we're trying to use.  Perhaps M$ doesn't employ any real engineers ... 

    I believe LI Shao posted the best answer.


    • Edited by old_geek Monday, December 12, 2011 3:50 PM
    Monday, December 12, 2011 3:49 PM