使用WinForms Visual Studio 2012中的按钮打开Visual Studio 2008 [英] Opening Visual Studio 2008 with a button in WinForms Visual Studio 2012
本文介绍了使用WinForms Visual Studio 2012中的按钮打开Visual Studio 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private void btnReport_Click(object sender, EventArgs e)
{
Process openVisualStudio2008 = new Process();
openVisualStudio2008.StartInfo.FileName = @"C:\Program Files(x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe";
openVisualStudio2008.Start();
}
如何正确指定文件名,因为如果我将文件名更改为
How can I specify the filename correctly, because if I change the Filename to
private void btnReport_Click(object sender, EventArgs e)
{
Process openVisualStudio2008 = new Process();
openVisualStudio2008.StartInfo.FileName = "devenv.exe";
openVisualStudio2008.Start();
}
它启动Visual Studio 2012.exe并且我正在寻找VS2008.exe启动。所有这一切的原因是我需要打开一个似乎只能在VS2008中工作的报告
it starts Visual Studio 2012.exe and im looking for VS2008.exe to start. The reason for all this is that I need to open a report which only seems to work in VS2008
推荐答案
private void btnReport_Click(object sender, EventArgs e)
{
Process openVisualStudio2008 = new Process();
openVisualStudio2008.StartInfo.FileName = @"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe";
openVisualStudio2008.Start();
}
我设法使用上面的代码。浏览到exe然后复制路径并粘贴到我的代码中。
问题编号2.如何让它自动在VS 2008中打开特定文件?
I managed to get it working with the code above. Browsed to the exe then copies the path and pasted into my code.
Problem number 2. How will I get it to open a specific file now in the VS 2008 automatically?
我管理让它使用上面的代码。浏览到exe然后复制路径并粘贴到我的代码中。
I managed to get it working with the code above. Browsed to the exe then copies the path and pasted into my code.
这篇关于使用WinForms Visual Studio 2012中的按钮打开Visual Studio 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文