I want to publish a web app from within an VS2010 extension.
In macro I use to write:
DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate()
DTE.ActiveWindow.Object.GetItem("MyWebApp").Select(vsUISelectionType.vsUISelectionTypeSelect)
DTE.ExecuteCommand("ClassViewContextMenus.ClassViewProject.Publish")
but this doesn’t seem to work from within an extension (c#).
It fails on the second line in c#, in VBA macro this works fine…
What is the correct way to start publishing process from a VS2010 extension?
Seems I need to put the solution name in front of the Web application name, so this code works:
Thanks to a hint from Chao Kuo on my post http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/2825d129-2f48-44f6-acf8-4038c9fd276d/