When you read “THE CLOUD,” I hope the voice in your mind sounded powerful and a bit haughty. The cloud holds lots of promise (and more than a few perils). If you find yourself using Visual Studio on multiple machines, you probably spend at least some of your precious time keeping your various development environments in sync, especially if you’ve invested any time in installing useful extensions or customizing Visual Studio to fit your preferences. Today, I’m going to show you how I have fully synchronized my Visual Studio setup across nearly a half-dozen machines through the magic of THE CLOUD.
In a typical week, I may find myself using Visual Studio on up to six different machines. There are certain tools and extensions that I simply cannot live without. In addition, I like to customize certain Visual Studio settings (I use tabs instead of spaces, for example), and I much prefer the Coding Instinct color scheme over the stock Visual Studio color scheme. After being inspired by Scott Hansleman’s post on the topic, I’ve even started customizing my Visual Studio toolbars and removing anything I don’t use every day.
That’s a fair amount of customization: extensions, colors, settings, toolbars, windows… I definitely don’t want to keep my various environments in sync by hand. I’ve tried, and it’s painful. I inevitably find something that works a little differently on one box from the others, and those inconsistencies annoy me. What I really want is for Visual Studio to work like Google Chrome, keeping all of my extensions and settings in sync through the magic of THE CLOUD.
Preparing Your Master Environment - Make It So!
With just a little bit of work, I’ve been able to *almost* fully address this challenge. First, go signup for Dropbox if you don’t have it already, and install it on all your development boxes.
Next decide which of your development machines will serve as your master environment. We’ll use this environment as the starting point for syncing through the cloud, but once we’re finished, you’ll be able to make a change in any environment and have it picked up by all your other environments. We’ll refer to this as your master environment from now on.
Open Visual Studio on your master machine, and enable automatic extension updates. Go to the Tools menu, then to Options, and find the Extension Manager settings. Check the “automatically check for updates to installed extensions” setting.
Next, use the Visual Studio Extension Manager to install ExtensionSync.
ExtensionSync is an add-in that will help you keep most of your Visual Studio extensions synchronized across machines. It can’t manage extensions that aren’t installed through Visual Studio Extension Manager though, therefore it can’t sync things like Resharper or AnkhSVN.
Once you’ve installed ExtensionSync, you need to tell it where to store its data. Go to the Visual Studio Tools menu, then to Options, then find Extension Sync.
There’s only one option: the directory where you want ExtensionSync to keep your data. Set this to a new directory that you create within your Dropbox. Remember that Dropbox automatically synchronizes everything to THE CLOUD.
Now that we have configured ExtensionSync, we need an extension that will help us keep our other settings in sync across our environments. For this, we’ll use Pepper. Go back to Visual Studio Extension Manager and install ‘Pepper’.
After installing Pepper, push your settings to THE CLOUD by going to the Visual Studio Tools menu and choosing “Pepper: VS Settings Backup & Sync”.
Click the Upload Settings button. When prompted for a username and password, enter whatever username and password you want to use from now on to keep your settings synchronized. BE SURE YOU DON’T FORGET YOUR USERNAME AND PASSWORD. After a few moments, your settings will now be safely stored in THE CLOUD, ready for you to redownload as needed.
Syncing Your Other Environments
The settings for your master environment are now synchronized to the cloud. We configured ExtensionSync to store its list of extensions via Dropbox, and we stored our remaining settings via Pepper. All we need to do is install ExtensionSync and Pepper on our other environments, and we’ll be able to keep our extensions and settings synchronized across all the environments.
Go to the Visual Studio Extension Manager on each of your other development boxes and install ExtensionSync. Go into the ExtensionSync options (via the Tools –> Options menu) and point it at your shared folder on Dropbox. ExtensionSync will see that the folder already contains data and will install any missing extensions. Also be sure that you tell Visual Studio to keep all your extensions up to date automatically (Tools –> Options –> Extension Manager). Go ahead and restart Visual Studio to complete the setup process. When you restart, you will find that you now have the “Pepper: VS Settings Backup & Sync” option in your Visual Studio tools menu. Run this, but this time choose to download your settings.
When prompted, enter your username and password exactly as you entered them when you saved your settings from your master environment. Pepper will download your settings and apply them. Repeat this process for any of your other development environments.
Congratulations, your development environments are now synchronized!
While this approach brings much-needed cloud synchronization capabilities to Visual Studio, it isn’t quite perfect. You still have to manually push/pull settings through Pepper when you make a change. As long as you aren’t tweaking your settings constantly, this shouldn’t be a problem. Unfortunately, not all extensions can be synchronized in this manner. Two of my most heavily-used add-ins, Resharper and AnkhSVN, are not available via the Extension Manager and therefore cannot be kept in sync by ExtensionSync.
Synchronize Even More…
I also happen to be an avid user of Powershell. I like my Powershell environment configured a certain way though, and I’ve found more than a small handful of useful functions and scripts over the years. I’d also like to keep my Powershell environment in sync across my various development environments. Thanks to the magic of Powershell and Dropbox, this is completely possible! I’ll be detailing how to set this up in my next post.
Anyway, what are you waiting for? Go download ExtensionSync and Pepper today and get your settings synchronized through THE CLOUD.