Visual Studio 2005 and C++ Directories
I have been playing with Visual Studio 2005. Don't call me "laggard", I am from "Late Majority" :-) The good news for skeptics like me was that 2005 coexists nicely with 2003. The bad news it is doesn't bring much for C++ developers. Well, sometimes no news is a good news.
Among other things, I checked how VC 8.0 stores C++ global settings.
Why do I care to know? I need to switch between two C++ projects. One of them is a huge legacy application that relies heavily on global Visual C++ directories. So every time I switch I have to go to Menu Tools Options Projects VC++ Directories, change Includes, change Libs, build, and when I'm done, change them all back for the current project. Doesn't look very tempting, eh? The standard workaround is using command line build and environment variables, which is fine for a build, not so good for debugging. My old favorite trick has been swapping Visual Studio global settings.
VS 6.0 was using registry to store them. Easy: just deal with .reg files.
In Visual Studio .NET 2003 it is a bit more complex: the registry key is still there: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories]. However, it contains only *default* settings. When you modify paths in Tools Options Projects VC++ Directories, this information is not persisted in the registry. Instead they are stored in your user application data directory. Look up VCComponents.dat at %USERPROFILE%\Local Settings\Application Data\Microsoft\VisualStudio\7.1\.
Visual Studio 2005 treats it exactly as 2003, except it is 8.0 instead of 7.1.
So whenever you want to save settings, distribute them to project members, or easily switch between different projects, deal with VCComponents.dat files. Make sure you don't have .NET running when swapping the files.