0

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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Matt W
  • 11,753
  • 25
  • 118
  • 215

0 Answers0