“构建已取消或失败”,无法调试或运行任何测试 [英] "The build was canceled or failed", impossible to Debug or Run any tests

查看:64
本文介绍了“构建已取消或失败”,无法调试或运行任何测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在测试项目中尝试调试和/或运行任何[TestMethod]时,我遇到了一个非常奇怪的错误...除了输出中有消息之外,没有什么是明显的。测试窗格显示"构建已取消或失败"。 
我可以构建整个解决方案,不会出现任何错误,没有警告等等。 这是我已经加载并运行多次测试的解决方案......它最近才开始发生,当我搁置了一些更改并恢复到之前的版本,但是再次,
a完成清理和重建显示没有错误。无论如何 我完全被难倒了。 我已关闭VS2017,重新启动我的机器等等,没有任何作用。 如果我尝试使用VS2015,则不会发生此错误。 任何帮助/建议将不胜感激。


解决方案

您是否在文本浏览器中使用调试选定测试? 


您正在调试哪种测试? 编码的UI测试需要
Visual Studio Enterprise
版本。



请选择 " 调试"除了"发布"之外模式并确保   构建配置
已设置到您的测试项目    解决方案  - >属性 - > 配置属性
并尝试再次调试 选中 



 


问候,


Fletcher








I'm having a very strange error when trying to Debug and/or Run any [TestMethod] in a test project...nothing is apparent other than the fact that there is a message in the Output | Tests pane which says "The build was canceled or failed".  I can build the entire solution and get no errors, no warnings, etc.  This is a solution which I've loaded and run tests with many times...it only recently started happening when I shelved some changes and reverted back to a prior version, but again, a complete Clean and Rebuild shows no errors whatsoever.  I'm completely stumped.  I've closed VS2017, re-booted my machine, etc., nothing works.  This error doesn't happen if i try VS2015.  Any help/suggestions would be greatly appreciated.

解决方案

Did you use Debug Selected Tests in Text explorer

and what kind of test are you debugging?  Coded UI testing needs Visual Studio Enterprise edition.

And please select "Debug" other than "Release" mode and make sure that the Build configuration has been set up to your test project  under Solution -> properties -> Configuration property and try to debug selected tests again.

 

Regards,

Fletcher


这篇关于“构建已取消或失败”,无法调试或运行任何测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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