Switch is an Addin for Visual Studio 2008, 2010 and 2012 that allows you to switch between C++ source and header files, WinForms code and designer, XAML and codebehind and more. With one button press, or keyboard shortcut, you can easily flick between related files.

(19) Review
Visual Studio
2012, 2010, 2008
Download (7,275)
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Reviews (19)
Q and A (7)
Sign in to write a review
Sort by:

by tomcheney | July 15 2015

I used to use this all the time but I cannot get it to install on VS2010 SP1. The installation claims to work fine but it doesnt show up in the extension manager

by Anton Kochetkov | July 29 2014

Good Addin, thank you.

But it doesn't work when the source and header files are located in the different directories.

It's a typical situation when headers are located in "project\include" and sources in "project\src"

Will wait for this functionality. Thank you.

by charliedurrant1 | February 24 2014

Thanks for a great add-in. I use VS 2013, 2012 and 2010 and to have one add-in
that covers all version is great. I assign Alt-S to switch and it just works.

I know VS2013 has Ctrl-K-O but it is a naff shortcut and I keep on hitting Ctrl-O
and get the file open dialog. I'm sure I could configure it to be Alt-S but this
solution works across VS versions.

Thanks for a very useful add-in! Very much appreciated

by Patrick V | October 07 2013

Thanks, works very well (VS2012 Update 3) on Win7 64-bit.
I use it all the time.

by wassim.azirar | October 04 2013

Didn't work for me (Visual Studio 2012 Update 3)
I'm using Windows 7 Enterprise 32bits.
Screenshot of error : http://bit.ly/158VJ0y

by yellowbigbird | September 29 2013

vs2010 sp1 works fine.
vs2008 sp1 crash.

by Sharon Eden | September 24 2013

The most important extension for C++

by rvkennedy | July 30 2013

Well done, works fine. I've not tried it yet with /src/ /include/ setups, or extensionless headers, but it works great for my main projects.

It's a little sad the Microsoft found the time to redraw all their icons and select just the right shade of purple, but not to introduce this basic functionality - but thanks for your efforts!

by kaedoc | July 30 2013

I installed switch too.
But I can't find switch button on menu.
My version is 2012 express with update3.
Is there problem with update3?

by Scarabus | July 14 2013

I'm having the same problem. Clicking the button does absolutely nothing. (VS2012)

by Rustam Akhtyamov | June 30 2013

Visual Studio Ultimate 2012
It doesn't work. Nothing happens when I press 'Switch' button :(

After several restarts of VS it works :)

DWM Kerr June 30 2013
| Edit |

Bizarre, I've not seen that behaviour before - if I hear of anything else like this I'll raise a task to look into it!

by Jörgen Sigvardsson | May 28 2013

DWM Kerr June 11 2013
| Edit |


by Marcus Riemer | April 13 2013

Thanks for this wonderful extension, in general, it works like a charm! I am migrating from QtCreator right now and I couldn't believe VS 2012 does not support this very basic operation ootb ...

I must say though, that the initial impression is lacking. Of course you explain everything at http://www.dwmkerr.com/switch/, but maybe you want to at least present that link to the user on the first start?

And maybe you could also explain how to set the keyboard shortcut in the main article, not only in the comments ;)

DWM Kerr June 11 2013
| Edit |

Hi Marcus - just as an update, version 2.0 automatically adds itself to the main menu, the instructions have been updated in the blog post (and shortly this article) and there are now options if you need to add other types of extensions to switch between :)

by Vrane | April 01 2013

Works perfect :)

Using Visual Studio 2012 and Win8 x64

by Joerg Julius | March 20 2013

I agree with 'ITSTH'. Doesen't show up neither in VS2012 nor VS2010. Doesn't work.

still doesn't show up. According to the extensions and updates manager it's not even installed.

by Alecazam | February 20 2013

This still doesn't show up in VS 2012. The installer is not fixed (at least for 2012 SP1).

DWM Kerr February 21 2013
| Edit |

Hi, can you tell me if you are 32 or 64 bit and what OS? Also, do you have visual studio installed to the default location? The installer I uploaded a few days ago has worked fine on both my dev machines, 2010 and 2012 - so I'd like to work out what's going wrong..

by ITSTH | October 24 2012

Sounds great, but it didn't turn up in VS2012. Not in the extension manager, not in the toolbar, not in the menus. :(

DWM Kerr February 16 2013
| Edit |

The installer is fixed, try again :)

by nullrr | August 16 2012

thanks!!! i need a Visual Studio 2012 version!

DWM Kerr December 02 2012
| Edit |

Just uploading it now :)

by DaveKerr | February 16 2012

I use this all day every day, Ctrl-Alt-S is the keybind I set up and it's fantastically useful.

Sign in to start a discussion

  • File location rules
    1 Posts | Last post March 23, 2016
    • Hi,
      I have a project where .h and .cpp files are not located in the same directory. In this setup switch does not work. 
      I have .cpp in /<namespace>/src and .h in /<namespace>/include/<namespace>
      Does switch only support switching between files in the same directory ?
      if so, could you extend it so it first searches the samme directory (as it does now) and then the entire solution like traversing from current location down into sub directories, then going up one step and repeating the traversion, then one step further up...
  • Crashes in 2008
    2 Posts | Last post March 01, 2014
    • Hi, When installing I choose all 3 compilers 2008,2010,2012. However it only appears and works in 2010 and 2012.
      In 2008 it crashes on launch (Error 8013101b) and disables.
      Any suggestions?
    • I'll look into this:
  • Visual studio 2013
    6 Posts | Last post February 24, 2014
    • Hello, 
      Does this addin work for visual studio 2013?
    • Not yet - I saw the issue raised by you on github and will hopefully have it working shortly
    • Looking Forward to this myself!
    • Maybe I'm late to the game, but 2013 has this option built in!
      The default shortcut is Ctrl+K + Ctrl+O, or right click in the editor -> Toggle Header / Code File.
    • Switch is available for VS2013 now, you can get it from:
      Or just search using the extension manager in Visual Studio.
    • noroom, 
      The feature may be in VS2013 for cpp and h files but the keyboard shortcut is annoying (I'm sure it could be reconfigured..) and this product is cross VS versions which is excellent as we have many projects in older VS versions. 
  • Eroor
    1 Posts | Last post November 26, 2013
    • I getting this eroor.
      : Failed to create the 'Swich' command
      visusl studio 2012 / 64bit / windows7 
  • cpp vs. cxx
    5 Posts | Last post June 13, 2013
    • Hi, in our team we use cxx instead of cpp extension for c++ source files. Switch does not allow me to customize the extensions and by default it does not work with .cxx.
    • I'm just finishing off version 2.0 at the moment - this adds the cxx/h extension as well as customisability, I'll update this post when it's online (12 to 24 hours)
    • And it's done - the download on this page is updated. Cxx to h is supported, you can also go to Tools > Options > Switch and reconfigure yourself if you need to! The code is available at:
    • Thanks, it works like a charm!
    • My pleasure!
  • Not showing in VS2012
    5 Posts | Last post June 11, 2013
    • Hi,
      I'm using Windows 7 (64-bit).
      I installed the latest version, selecting VS2010 and VS2012 as I have both versions installed, and Install Switch for "Just me".
      In neither version of Visual Studio the Addin shows up.
      However, if I go to 
      View > Toolbars > Customize > Keyboard
      I can see Switch2010 and Switch2012 commands, I can assign keyboard shortcut
      and it works.
      Not sure why it is not displayed.
    • Hi,
      By default, it will just appear in the 'Tools' menu, not on the main toolbar - do you see it in the tools menu? 
    • Hi DWM Kerr, indeed, yes I see it in the 'Tools' menu. Clearly, the screenshot on the front page confused me! Thanks
    • No probs - for the next version I'll add it to the main menu as in the screenshot :)
    • FYI Switch is now installed to the main menu by default (from Version 2.0 onwards)
  • Switch.msi produces Error 1309 on multiple files...
    7 Posts | Last post February 26, 2013
    • Hi.
      Thank you for Switch.
      I have used Switch some time before the latest v1.2 (12/2/2012) and it had worked great in Visual Studio 2010.
      However, I am trying to install v1.2 on a clean machine and I am getting Error 1309 on multiple files.
      Running the msi after downloading it from it's local location here: C:\Users\rami.abughazaleh\Downloads\Switch.msi
      Error 1309. Error reading from file: C:\Users\rami.abughazaleh\Downloads\program files\Switch\Switch2008.AddIn.  Verify that the file exists and that you can access it.
      [Abort] [Retry] [Ignore]
      Retry produces the same error.
      Ignore attempts to continue on to the next file, but the same error appears but with a different file path:
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2010\Addins\Switch2010.AddIn
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2012\Addins\Switch2012.AddIn
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2008\Addins\en-US\Switch2008.Resources.dll
      C:\Users\rami.abughazaleh\Downloads\program files\Switch\Switch2008.dll
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2010\Addins\en-US\en-US\Switch2010.Resources.dll
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2010\Addins\en-US\Switch2010.Resources.dll
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2010\Addins\Switch2010.dll
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2012\Addins\en-US\Switch2012.Resources.dll
      C:\Users\rami.abughazaleh\Downloads\Personal\Visual Studio 2012\Addins\Switch2012.dll
      After installation, "C:\Program Files (x86)\Switch" is empty.
      Windows 7 Enterprise 64-bit (English)
      I believe this is an issue with the way the setup installer was authored with InstallShield.
    • Looking into this now, will post when it's fixed :)
    • I am also getting these errors.  I believe the install did not place the files to install within itself and is looking for them outside the MSI.  Where I work we make CDs with MSIs this way to provide our customers access to the files that get installed off of the CD.
    • Same here, I also tried to manually extract all files from the msi, and got the same errors. It looks like the files are not in the package, or msiexec can't extract them for some reason.
      I'm running 64 bit Windows 8 Pro.
    • Try the version uploaded most recently, on the 16th of February- I've rebuilt the installer.
    • Thank you, it worked without issues! :)
    • Thank you, I'm glad it worked! Please upvote if you like the extension :)