安装.NET Core 2.0后Resharper xUnit测试不起作用 [英] Resharper xUnit tests not working after installing .NET Core 2.0

查看:82
本文介绍了安装.NET Core 2.0后Resharper xUnit测试不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装.NET Core SDK 2.0之后,所有测试都无法通过Resharper找到针对.NET Core以前版本的解决方案。

Right after installing .NET Core SDK 2.0, all tests a solution that targets the previous version of .NET Core fail to be discovered by Resharper.

此外,当我将它们手动添加到会话中并尝试运行它们,我得到一个不确定:测试未运行:

Also, when I add them manually to the session and attempt to run them, I get an "Inconclusive: Test not run":

此外,上一条消息还有这些例外:

Also, there's these exceptions along with the previous message:

如果我卸载.NET Core SDK 2.0,则一切正常。完全没有问题。尝试过x86和x64版本,结果相同。

If I uninstall .NET Core SDK 2.0, everything works as expected. No issues at all. Tried both x86 and x64 versions, same results.

解决方案中的所有项目均以.NET Core 1.1为目标。

All projects in the solution target .NET Core 1.1.

从Test Explorer运行测试仍然可以正常工作。

Running tests from Test Explorer still works just fine.

关于如何解决此问题的任何想法?可能是Resharper的错误吗?

Any ideas on how to solve this? Could it be a Resharper bug?

推荐答案

似乎我们需要等待Resharper的更新(我遇到了完全相同的问题错误)。

It seems we need to wait for a Resharper update (I've encountered exactly the same error).

与此同时,您可以从Visual Studio运行程序运行测试-似乎工作正常。

Meanwhile, you can run your tests from the Visual Studio runner - it seems to be working fine.

编辑:

您还可以尝试安装Resharper 2017.2的早期版本( https://www.jetbrains.com/resharper/eap/ ),如果您感到冒险;)我刚刚检查过,它可以正常工作罚款(自EAP 2017.2 12起)使用nUnit,xUnit和MSTest测试。

You can also try installing the early version of the Resharper 2017.2 (https://www.jetbrains.com/resharper/eap/) if you feel adventurous ;) I've just checked and it works fine (as of EAP 2017.2 12) with nUnit, xUnit and MSTest tests.

这篇关于安装.NET Core 2.0后Resharper xUnit测试不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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