Visual Studio Shortcut to Attach to IISExpress

Looking for a way to quickly attach to the IISExpress process for your ASP.net development?  In previous versions of Visual Studio, I used the ‘Macro’ feature to search for and attach to a process with the name iisexpress.exe.  I could then bind this to a keyboard shortcut (like F1).

Everything worked great, however, in Visual Studio 2012 the ‘Macro’ feature has been removed.  Instead, the approach now required is to create a Visual Studio Add-In.  I started working on this and then found there was one that actually already existed, and it works well with Visual Studio 2012.  No administrative privileges needed to install it either.  You may need to restart Visual Studio to see it in the TOOLS menu.

Visual Studio Gallery AttachTo Extension Download

Update: The VSGallery extension does not support VS2013 as noted in the ‘SUPPORTS’ section of the page above. A user submitted a merge request from the main Github branch (https://github.com/whut/AttachTo/pull/5) which updates this for VS2013. I have downloaded and compiled this into an updated VSIX that I am providing here for download if you use VS2013.

Without going into too much detail why, I use this instead of the “IIS Express” features built into Visual Studio because I still haven’t quite figured out how to make IIS Express work with port 80 and not go ballistic on my applicationhost.config file or require some elaborate configuration changes.  Ideally, I would be able to associate my website project to a <site> entry already in my applicationhost.config that not change any of my bindings, although I haven’t quite figured out how to do that yet.

In the meantime, the AttachTo extension seems to work great, and Visual Studio 2012 gives you great control over what appears in your menus.   If you go to TOOLS > Customize, then select the “Commands” tab you will see where you can personalize your menu.  You can re-arrange the add-ins shortcuts and/or remove unused ones it creates.  Also, TOOLS > Options > Keyboard and search for Tools.AttachtoIISExpress.  You can then bind this to any keyboard shortcut you like.

 

Kyle Ballard