Team Explorer Profile Manager–Take 1

If there is one thing I can generally count on doing at least once a day it’s firing up Visual Studio 2010.  Along with Visual Studio 2010 I am also a heavy user of Team Foundation Server 2010.  I use it at my “day job” as well as at home on “side” projects.  At work, I switch among multiple Team Project Collections and Team Projects relatively frequently.  At home, more so because I tend to work with several CodePlex projects as well as local TPCs and Team Projects on my development laptop.

[UPDATE: A new release is available – see Update History below…]

If this sounds like you then you’ve no doubt experienced the pain of having to continually switch TPCs in Visual Studio Team Explorer.  It goes something like this:

  1. Fire up Visual Studio 2010
  2. Click on the Team Explorer tab only to realize that the project you need is in another TPC
  3. Click on the “Connect to Team Project” icon and switch TPCs and select the desired Team Projects
  4. Click the confirmation dialog warning you that connecting to another TPC will close all queries, etc.
  5. While working, you decide to open another instance of Visual Studio to take a look at a different project
  6. You click on the Team Explorer tab only to realize, that once again, you’re connected to the wrong TPC so you repeat steps 2 – 4
  7. And so on…

Wouldn’t it be nice if you could simply launch Visual Studio and have it connect to the TPC and Team Projects you need from the start?  Well, that’s where the Team Explorer Profile Manager (TEPM) comes in.  I wrote this utility to handle exactly this scenario.

What Is TEPM?

Once you run TEPM it sits in the Windows “system tray” area waiting for you to right-click on it.  Once you do, you will see a menu structure something like this:

image

Based on the menu items seen above you might have guessed that TEPM works on the basis of “profiles”.  A profile is simply a snapshot of the Team Explorer settings taken at a given time.  Here’s how it works:

  1. Fire up Visual Studio 2010 (TEPM currently works only with Visual Studio 2010)
  2. Connect to the desired TPC and select the active Team Projects you wish to work with
  3. Right-click on the TEPM icon to get the above menu and select “Manage Profiles”.  This will display the following dialog allowing you to name the profile for the current Team Explorer settings:

    image

  4. Once you’ve entered a profile name (using only valid filename characters) click on the Copy button to create the profile.

Repeat the above steps for the various TPCs and Team Projects you regularly work with.

Now, when you right-click on the TEPM icon to get the above menu, hover over the Launch Saved Profile menu option to display a list of profiles.  For example:

image

Notice in the screenshot above, I have six profiles configured.  Selecting a profile will launch Visual Studio 2010 with the correct Team Explorer settings.  So the next time you need to fire up Visual Studio 2010 to work in a TPC different from what you’re currently working in simply right-click and launch!

Some Other Info

TEPMAboutLogo2This is a “v1.0” product.  It works (at least for me) and should work for you.  You may encounter bugs and, if you do, I would really like to know about them so I can fix them.  The first time you run TEPM it will create a “baseline” profile that matches your current settings.  You can revert to this baseline at any time by selecting the Launch Baseline Profile menu item.  You can also reset the baseline to a specific profile by clicking on the Create Baseline button in the “Manage Profiles” dialog shown above.

Currently, there is no option for running this utility when you first logon to Windows.  I plan to add this soon but just haven’t done it yet.[done]  If there are any other options that you’d like to see, please let me know.

There is also no installation package at this time (e.g. no MSI).  I plan to add that soon as well but for now, the download is simply a ZIP file that contains a single EXE.  Copy the EXE to the desired location on your machine and double-click it to run it.[done]

Download

Eventually, this will be hosted on the Visual Studio Code Gallery.  Until I get it there, you can download the ZIP file from here.

Please let me know if you have any questions, suggestions, criticisms, etc.

Update History

  • 30 August 2011 – Miscellaneous updates, including:
    • Now packaged as a setup file.  You no longer need to manually copy the file to a directory to install it.
    • Added a Settings dialog with the option to automatically run TEPM on startup
    • Double-clicking the TEPM icon will now launch Visual Studio 2010 using the current profile
    • Removed the “Copy Current Profile” menu option and merged into “Manage Profiles”
  • 24 August 2011 – Version 1.0 Published
ContactUs.com