Tag: external process

有没有一种方法可以将外部进程的结果流式传输到Visual Studio输出窗格?

我在VsPackage设置了一个自定义输出窗格,类似于以下内容: ///——————————————————————————– /// This property gets the custom output pane. ///——————————————————————————– private Guid _customPaneGuid = Guid.Empty; private IVsOutputWindowPane _customPane = null; private IVsOutputWindowPane customPane { get { if (_customPane == null) { IVsOutputWindow outputWindow = GetService(typeof(SVsOutputWindow)) as IVsOutputWindow; if (outputWindow != null) { // look for existing solution updater pane if (_customPaneGuid == Guid.Empty || […]

C#:重定向控制台应用程序输出:如何刷新输出?

我正在产生外部控制台应用程序并使用异步输出重定向。 如此SOpost所示 我的问题是,在得到OutputDataReceived事件通知之前,生成的进程似乎需要产生一定量的输出。 我想尽快收到OutputDataReceived事件。 我有一个简单的重定向应用程序,这里有一些观察: 1.当我打电话给简单的’while(true)打印(“X”)时; 控制台应用程序(C#)我立即收到输出事件。 2.当我调用3d派对应用程序时,我试图从命令行换行,我看到逐行输出。 3.当我从裸骨包装器中调用该3d派对应用程序时(参见1) – 输出以块(约一页大小)的forms出现。 该应用内发生了什么? 仅供参考:有问题的应用程序是“USBee DX数据Exctarctor(异步总线)v1.0”。