I started working on a new project which has a "slightly" different environment settings than the usual coding standards in my company. Namely, we use insert spaces as coding guideline, while the new project uses keep tabs as option for indenting. Tabs/Indent size is the same as default - 4 spaces.
Normally, in such case it would be very difficult (almost impossible) to work simultaneously on several projects and to keep up with specific settings across the projects. At some point of time i will mess up one of the projects with the settings from the other one - and i'll end up with strange diffs in my source code repository.
I thought that it would be nice if such settings could be carried across project/solution files and completely transparent for us, developers, but that's only wishful thinking.
The solution that i came up with is based on a Visual Studio ResetSettings switch for restoring of the settings. According to the MSDN documentation, it is possible to have an optional argument for this switch in the form of .vssettings file with your own custom VS settings. Bingo!
I exported the different settings for Tab handling into two files:
and created two shortcuts in my start menu:
with the following shortcut target values:
VS 2008 - Spaces : "path-to-your-vs\devenv.exe" /ResetSettings "d:\vs_spaces.vssettings" VS 2008 - Tabs : "path-to-your-vs\devenv.exe" /ResetSettings "d:\vs_tabs.vssettings"
VS 2008 - Spaces : "path-to-your-vs\devenv.exe" /ResetSettings "d:\vs_spaces.vssettings"
VS 2008 - Tabs : "path-to-your-vs\devenv.exe" /ResetSettings "d:\vs_tabs.vssettings"
Now the only thing that i have to remember is which project works with which settings :)
Apart from that and the fact that i have to wait for additional 5-10 sec. upon each VS startup, i found this solution useful and workable.