【发布时间】:2012-11-29 06:13:02
【问题描述】:
我的 Visual Studio 扩展程序生成了一个 URL,我想在 Visual Studio 中将它作为一个新选项卡打开。
我可以使用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
【问题讨论】:
标签: c# visual-studio-2010 vsix