My visual studio extension generates a URL and I want to open it inside the Visual Studio as a new tab.
I could just use Process.Start() to open an external browser but this doesn’t look good.
I can open files from disk using this method:
void OnOpenBrowserWindow(string url)
{
if (url != null)
{
IVsCommandWindow service = (IVsCommandWindow) this.GetService(typeof (SVsCommandWindow));
if (service != null)
{
string command = string.Format("File.OpenFile \"{0}\"", url);
service.ExecuteCommand(command);
}
}
}
but it doesn’t work for URLs
Easiest way is to use ItemOperations.Navigate() method.