I want to launch an aUnit 2.4.2 test from within a top level .NET 6 program and have added the xunit.runner.console
v2.4.2 package to my project.
However, when I add this code:
var testAssembly = typeof(MyTestClass).Assembly;
var testResults = new Xunit.Runner.Console.Runner().RunAssembly(testAssembly);
VS Code complains that Xunit.Runner
is not available.
How do I invoke the xUnit runner from within my own code?