Although I have been unable to reproduce the problem, I have discovered some things while debugging Refactor. One is that the dump sent to me by one customer indicates that there is a wait happening for a message in one of the windows when there are no Refactor windows visible. The second is that the same Unhandled Exception pops up reliably any time a Refactor window is opened, even when Refactor is working correctly. The type of exception is a ThreadAbortException.
My theory is that the thread abort may cause the Refactor application's AppDomain to unload in some (unknown) circumstances. I can stop this exception from happening by changing a configuration option in SqlWb.exe.
Can you please try this:
- Open the directory %programfiles%\\microsoft sql server\\90\\tools\\binn\\vsshell\\common7\\ide in Windows Explorer
- Open the file SqlWb.exe.config with Notepad
- Change the line <legacyUnhandledExceptionPolicy enabled="1"/> to <legacyUnhandledExceptionPolicy enabled="0"/>
- Launch SSMS and invoke a SQL Refactor menu item
I hope this works! If not, please put SqlWb.exe back the way it was.