Setting Global C++ Include Paths in Visual Studio 2012 (and 2013, and 2010)

Starting with Visual Studio 2010, Microsoft decided to make life hard on C++ developers.  System-wide include path settings used to be accessed through Tools | Options | Projects and Solutions | VC++ Directories.  However, that option is gone:

VS2012_ToolsOptionsDirectories

Instead, the system-wide include paths are now located within the ‘Properties’ interface.  To access it, select View | Property Manager.  No dialog will appear yet. Instead, the Property Manager appears as a tab along with the Solution Explorer:

VS2012_OptionsPropertyManager

Note:  The Property Manager won’t contain anything unless a solution is loaded.

If the Property Manager is missing, it can be shown by selecting View | Other Windows | Property Manager from the menu.

Now, expand one of your projects, then expand Debug | Win32 or Release | Win32:

VS2012_PropertyPageProjectExpanded

Right click Microsoft.Cpp.Win32.user and select Properties: VS2012_PropertyPageProjectExpandedMenu

This brings up the Microsoft.Cpp.Win32.User Property Pages dialog, which should look familiar enough:

VS2012_Win32UserPropertyPage

Alternate Access The properties can be accessed directly as an XML file by editing

%LOCALAPPDATA%\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props

VS2012_Win32UserPropsXML

Rant: None of this makes any sense whatsoever. Why do I have to have a solution loaded before I can edit the system-wide (technically user-wide) path settings?  The old system made sense: project-specific include paths were set in the properties of individual projects, and system include paths were set through the Tools menu. The layout is irritating, forgettable, and, most importantly, it makes absolutely no sense to access system settings by clicking through your own projects!

About Jeff Fitzsimons

Jeff Fitzsimons is a software engineer in the California Bay Area. Technical specialties include C++, Win32, and multithreading. Personal interests include rock climbing, cycling, motorcycles, and photography.
This entry was posted in Technology, Windows. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>