How can I programmatically refresh Visual Studio Solution Explorer?
I can get a hold of the solution explorer window object, but don’t know what to do with it!
var solutionExplorer = (UIHierarchy)DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object();
Thanks.
Usually you can figure out these things by recording a temporary macro, doing what you want to do, and seeing what comes out in the macro editor.
Indeed, this is a case where it’s probably only by recording a temporary macro that you can figure out how to do this. Here’s the command to refresh the Solution Explorer: