相关疑难解决方法(0)

无法初始化客户端代理:无法连接到vstest.discoveryengine.x86.exe

之前,我能够在Visual Studio 2013下运行特定项目的单元测试.这最近停止了工作,没有对项目进行重大改变,不幸的是,我不记得它什么时候做了最后一次工作,也没有改变.但是,对项目本身的任何修改都是最小的(一个或两个新方法),并且不涉及任何配置文件更改或类似的频繁报告的问题.我相信Visual Studio(可能是最近的更新)或插件或第三方软件的更改导致了以下问题.

加载项目时,一分钟后,"输出"窗口中的"测试"输出显示:

------发现测试开始------
无法初始化客户端代理:无法连接到测试进程vstest.discoveryengine.x86.exe.
==========发现测试结束:0找到(0:00:59.8853102)==========

类似于以前报告的问题,只是调试停止工作,以管理员身份运行Visual Studio似乎"解决"了这个问题.然而,这只是表明问题可能与访问权限有关.

我发现了一个相关的Microsoft Connect错误报告,该报告还暗示了由第三方应用程序引起的问题.显然vstest.discoveryengine.x86.exe使用命名管道进行通信devenv.exe.另一个应用程序可能会使用该请求,从而导致Visual Studio连接失败.但是,验证哪些命名管道正在使用中,我没有找到任何立即明显的罪魁祸首.我还想象连接可能由于其他原因而失败.

启用日志记录后 devenv.exe,vstest.executionengine.exevstest.discoveryengine.exe我发现与在devenv的日志中发现引擎但下列情况除外:

E, 10048, 42, 2014/12/22, 01:47:13.683, 63637924754, devenv.exe, TestRunnerServiceClient: Could not connect to test runner service within the available time 60000. Reason:System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://steven-flip/vstest.discoveryengine/8232 that could accept the message. This is often caused by an incorrect address or SOAP action. See …
Run Code Online (Sandbox Code Playgroud)

mstest visual-studio

28
推荐指数
2
解决办法
9321
查看次数

通过管道在c ++和c#之间进行通信

我想通过管道将数据从ac#应用程序发送到c ++应用程序.这就是我所做的:

这是c ++客户端:

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>


int _tmain(int argc, _TCHAR* argv[]) {

  HANDLE hFile;
  BOOL flg;
  DWORD dwWrite;
  char szPipeUpdate[200];
  hFile = CreateFile(L"\\\\.\\pipe\\BvrPipe", GENERIC_WRITE,
                             0, NULL, OPEN_EXISTING,
                             0, NULL);

  strcpy(szPipeUpdate,"Data from Named Pipe client for createnamedpipe");
  if(hFile == INVALID_HANDLE_VALUE)
  { 
      DWORD dw = GetLastError();
      printf("CreateFile failed for Named Pipe client\n:" );
  }
  else
  {
      flg = WriteFile(hFile, szPipeUpdate, strlen(szPipeUpdate), &dwWrite, NULL);
      if (FALSE == flg)
      {
         printf("WriteFile failed for Named Pipe client\n");
      }
      else
      {
         printf("WriteFile …
Run Code Online (Sandbox Code Playgroud)

c# c++ ipc

6
推荐指数
1
解决办法
8999
查看次数

如何从 Windows 上的命令行查看命名管道权限

我有一个现有的命名管道,比如\\.\pipe\my_pipe. 我如何从 cmd 或 powershell 获取管道的 ACL/权限?

windows powershell named-pipes

6
推荐指数
1
解决办法
1908
查看次数

如何在Windows中获取所有打开的命名管道列表并避免可能的异常?

获取命名管道列表在理想情况下非常简单,可以在这里找到: 如何在Windows中获取所有打开命名管道的列表?

但提到了解决方案

var namedPipes = Directory.GetFiles(@"\\.\pipe\");
Run Code Online (Sandbox Code Playgroud)

偶尔会有不可预测的结果.上面的链接中提到了其中一个(路径异常中的无效字符).今天我遇到了我自己的异常--ArgumentException"第二个路径片段不能是驱动器或UNC名称.参数名称:path2".

问题是.net中是否有任何真正可行的解决方案来获取所有打开的命名管道的列表?谢谢

.net c# named-pipes

4
推荐指数
1
解决办法
4991
查看次数

使用win32api获取Windows上的命名管道列表?

您可以让用户安装pipelist实用程序,然后处理以下输出:

subprocess.check_output("pipelist", universal_newlines=True)
Run Code Online (Sandbox Code Playgroud)

使用C#,还可以执行以下操作:

String[] listOfPipes = System.IO.Directory.GetFiles(@"\\.\pipe\");
Run Code Online (Sandbox Code Playgroud)

有没有办法使用pywin32/ 复制这个C#解决方案win32api

windows winapi pywin32 python-3.x

3
推荐指数
1
解决办法
459
查看次数

标签 统计

c# ×2

named-pipes ×2

windows ×2

.net ×1

c++ ×1

ipc ×1

mstest ×1

powershell ×1

python-3.x ×1

pywin32 ×1

visual-studio ×1

winapi ×1