Is it possible to refresh WCF service reference from VS2010 addin?

后端 未结 2 425
故里飘歌
故里飘歌 2021-02-06 01:54

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

2条回答
  •  抹茶落季
    2021-02-06 02:14

    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");
    

提交回复
热议问题