How can I programmatically update Visual Studio Solution Explorer?

How can I programmatically update Visual Studio Solution Explorer?

I can catch the window object of the solution explorer, but I don’t know what to do with it!

var solutionExplorer = (UIHierarchy)DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object();

Thank.

+5
source share
1 answer

You can usually understand these things by writing a temporary macro, doing what you want to do, and see what happened in the macro editor.

In fact, this is a case where it is probably only by recording a temporary macro that you can figure out how to do it. Here is the solution explorer update command:

DTE.Commands.Raise("{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}", 222, null, null)
+5
source

All Articles