This is an update to http://blogs.msdn.com/b/irenak/archive/2009/12/16/sysk-375-visual-studio-add-in-for-managing-configuration-files-across-environments.aspx. The provided code is upgraded for Visual Studio 2010, and also now supports nested projects (e.g. a project that is a container for other projects).
To deploy, copy ConfigAddIn.AddIn to C:\Users\YourLoginName\Documents\Visual Studio 2010\Addins folder. Open it in a text editor, and update the path to where you put ConfigAddIn.dll and ConfigAddIn.dll.config files. Change TargetEnvironments setting in ConfigAddIn.dll.config to your desired environment names:
<setting name=”TargetEnvironments” serializeAs=”String”>
[Aug 30, 2010] – Fixed a bug (config file had older version for System.dll assembly). Updated source posted.