我在VS 2012中看到了here作为旧挂起更改窗口的解决方案。
是否存在不显示命令提示符窗口但仅显示挂起更改窗口的参数?
我创建了一个VS 2012扩展,我编写了以下代码:
public void Exec( string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled )
{
handled = false;
if ( executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault ) {
if ( commandName == "OldPendingChanges.Connect.OldPendingChanges" ) {
handled = true;
using ( var process = new System.Diagnostics.Process { StartInfo = CProcessStartInfo() } ) {
process.Start();
//process.WaitForExit();
}
return;
}
}
}
private ProcessStartInfo CProcessStartInfo()
{
return new ProcessStartInfo
{
FileName = "tf.exe",
RedirectStandardInput = false,
RedirectStandardOutput = false,
CreateNoWindow = true,
WorkingDirectory = @"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE",
Arguments = "checkin"
};
}
但它仍然出现命令提示符窗口。我也用WindowStyle = ProcessWindowStyle.Hidden
但没有成功。
由于