When attempting to refactor in VS2010 a message box will appear with the message "Could not prepare files for refactoring".

This is a mildly aggravating bug that I had found a solution for a couple years ago and then promptly forgot. Since moving all my development to virtual machines on my Macs though it has resurfaced - mo' VS installations, mo' problems.

In this case I had a project that is using the Microsoft Web Deployment project. When I went to load our solution up for the first time of course that project type was missing so I searched for it and the first link that comes up is the beta released in April 2010. So I installed that. Whoops.

What you really want is the "Visual Studio® 2010 Web Deployment Projects - RTW" whatever the fuck RTW means [I know its release to web, but seriously, stop will the nonse release acronyms]. You can find it here:

http://www.microsoft.com/download/en/details.aspx?id=24509

You'll need to uninstall the beta if you have it installed before installing the final version.