Resharper xUnit tests not working after installing .NET Core 2.0

妖精的绣舞 提交于 2019-12-08 17:30:27

问题


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:

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

All projects in the solution target .NET Core 1.1.

Running tests from Test Explorer still works just fine.

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


回答1:


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

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

EDIT:

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.




回答2:


I had this come up with Resharper 2018.1 using Visual Studio 2017 Preview (15.7.27617.1) and by chance I took out the underscore from one of my test classes and happened to rerun the tests and they worked!

So if anyone's still having this problem, try getting rid of underscores in your test class names if you have any.



来源:https://stackoverflow.com/questions/45775440/resharper-xunit-tests-not-working-after-installing-net-core-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!