没有发现测试.确保已安装测试发现者 &执行者、平台和框架版本设置合适,再试一次 [英] No test found. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again

查看:19
本文介绍了没有发现测试.确保已安装测试发现者 &执行者、平台和框架版本设置合适,再试一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我们现有的解决方案升级到 .Net 4.6.1,并且无法在服务器构建期间运行我们的单元测试.在本地,它们按预期运行,并将框架版本翻转回 .Net 4.5.1 使它们再次在服务器上运行.

I am in the process of upgrading our existing solution to .Net 4.6.1 and have been unable to get our unit tests to run during a server build. Locally they run as expected and flipping the framework version back to .Net 4.5.1 makes them run again on the server.

我收到以下错误:

未找到测试.确保已安装测试发现者 &执行者、平台和框架版本设置合适,然后重试.

No test found. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.

我在一个更简单的设置中重现了这个问题:

I have reproduced the problem in a simpler setup:

  • 具有两个测试(一个失败,一个通过)的单个 C# 单元测试项目的解决方案.
  • XAML 构建定义使用默认模板 (TfvcTemplate.12.xaml)
  • TFS 2015 更新 1带有 Visual Studio Enterprise 2015 Update 1 的 XAML 构建服务器已安装(有六个类似的服务器,并且都产生相同的结果)

推荐答案

您可以尝试将测试设置中的默认处理器架构从 X86 更改为 X64.就我而言,这就是问题所在.

You can try to change your default processor architecture in your Test Setting from X86 to X64. In my case this was the problem.

如果被测项目的平台目标设置为 x64,就会发生这种情况.

This happens if the platform target of your project under test is set to x64.

这篇关于没有发现测试.确保已安装测试发现者 &执行者、平台和框架版本设置合适,再试一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆