I’ve tried lots of refactoring tools and always found that some of the features are awesome but generally there is always something that makes me uninstall them in the end – mostly how sluggish the IDE becomes. One of the features I missed having recently uninstalled the latest productivity enhancing tool that I was trying was the “extract class to file” refactoring.
I did a brief Google and found nothing similar so it was off to the VS Macro language to see whether I could create my own. The biggest issue I had was that Macros in Visual Studio 2010 didn’t seem to work for me at all. On a good day I got one run before they stopped working. Luckily for me the VS2010 SP1 beta is out now and having installed that it fixed the macros problem, seems to me being very slow in the adoption of the latest and greatest sometimes has its benefits.
Update Sept 2011 - see documentation page for download.
Anyhow this experiment lead to two outcomes – firstly the working macro which you can
download as source or as a macro project here – for help installing the macro project or pasting in the source into your existing macro project try this article. Secondly this screenshot of one of my early fails as the retry loop never ended and filled my visual studio with test files :)