C# VSIX:打开浏览器窗口

C# VSIX:打开浏览器窗口,c#,visual-studio-2010,vsix,C#,Visual Studio 2010,Vsix,我的VisualStudio扩展生成了一个URL,我想在VisualStudio中作为一个新选项卡打开它 我可以使用Process.Start()打开一个外部浏览器,但这看起来不太好 我可以使用以下方法从磁盘打开文件: void OnOpenBrowserWindow(string url) { if (url != null) { IVsCommandWindow service = (IVsCommandWindow) this.GetService(

我的VisualStudio扩展生成了一个URL,我想在VisualStudio中作为一个新选项卡打开它

我可以使用
Process.Start()
打开一个外部浏览器,但这看起来不太好

我可以使用以下方法从磁盘打开文件:

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);
        }
     }
  }
但它不适用于URL

最简单的方法是使用方法

最简单的方法是使用方法

var itemOps = Dte.ItemOperations;
itemOps.Navigate("http://bing.com");