I want to \"simulate\" the Right click/Update service reference command in a VS2010 addin. I have a reference to the containing (Silverlight...) project, I know the name of the
I believe the visual studio command for this is "Project.UpdateServiceReference
". So I guess you can try to select the node you're interested in, and run this command, like this:
envDTE.Windows.Item(vsWindowKindSolutionExplorer).Activate();
envDTE.ActiveWindow.Object.GetItem(@"MyProject\Service References\Proxy").Select(vsUISelectionType.vsUISelectionTypeSelect);
envDTE.ExecuteCommand("Project.UpdateServiceReference");