Studio visual code error while debugging xunit test

The test could not be started because null.

A strange error while trying to run the xunit test in visual studio code .

enter image description here

+5
source share
2 answers

This error message seems to come from github.com/OmniSharp/omnisharp-vscode/blob/master/src/featur es / Are you trying to run the xUnit .NET test? Looks like only dotnet kernel tests are supported !?

+1
source

For us, the problem was nested classes. OmniSharp cannot handle this:

public class SomeClass { public class SomeMethod { [Fact] public void SomeTest() { } } } 

However, he can handle this:

 public class SomeMethod { [Fact] public void SomeTest() { } } 
0
source

Source: https://habr.com/ru/post/1260489/


All Articles