How can I run NUnit test in VS Code with .NET TEST EXPLORER

Viewed 9673

I would like to run unit tests from .NET TEST EXPLORER, not the command line. I can run tests when navigating to the unit test directory and executing dotnet test.

But selecting .NET TEST EXPLORER shows:

Please open or set the test project and ensure your project compiles

Is it related to the NUnit nature of the test project?
Project does compile. How do I set the test project?

2 Answers

In VISUAL STUDIO CODE, select the Settings wheel (Manage) > Extensions > Workspace Settings > Test Project Path

Enter the relative path to the unit test project: MyProject.Test/MyProject.Test.csprojx.

Related