Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet-test does not find dotnet-test-xunit executable

See original GitHub issue

Steps to reproduce

    "version": "1.0.0-*",
    "dependencies": {
        "System.Data.SqlClient": "4.1.0-rc2-23931",
        "xunit": "2.1.0"
    "frameworks": {
        "netstandardapp1.5": {
            "dependencies": {
                "dotnet-test-xunit": "1.0.0-dev-128011-22",
                "NETStandard.Library": "1.5.0-rc2-23931"
            "imports": [
    "testRunner": "xunit"
using Xunit;

namespace ConsoleApplication
    public class Test
        public void ShouldFail()

Attached full repro project and lock file.

dotnet restore dotnet test

Expected behavior

Execute the one test in the project.

Actual behavior

Compiling sni-test for .NETStandardApp,Version=v1.5

Compilation succeeded.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:03.2853214

dotnet-test Error: 0 : Microsoft.DotNet.Cli.Utils.CommandUnknownException: No executable found matching command "dotnet-test-xunit"
   at Microsoft.DotNet.Cli.Utils.ProjectDependenciesCommandFactory.FindProjectDependencyCommands(String commandName, IEnumerable`1 commandArgs, String configuration, NuGetFramework framework, String outputPath, String buildBasePath, String projectDirectory)
   at Microsoft.DotNet.Cli.Utils.ProjectDependenciesCommandFactory.Create(String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration)
   at Microsoft.DotNet.Tools.Test.ConsoleTestRunner.DoRunTests(ProjectContext projectContext, DotnetTestParams dotnetTestParams)
   at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-beta-002202)

Product Information:
 Version:     1.0.0-beta-002202
 Commit Sha:  60b23d5115

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Happens on osx.10.11-x64 too.

This seems odd. Am I missing something obvious?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

TheRealPiotrPcommented, Apr 5, 2016

restore with --infer-runtimes to get unblocked. @livarcocc was taking a look into root caus.

TheRealPiotrPcommented, Jan 18, 2017

since dotnet test was reimplemented as a wrapper on vstest.console, this approach to finding test runners is no longer in existence. Closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet test does not recognize xunit tests
I was working on a windows machine and I did the following to make it work. Closed all my vscode / visual studio...
Read more >
dotnet test command - .NET CLI
The dotnet test command is used to execute unit tests in a given project. ... NET.Test.Sdk is the test host, xunit is the...
Read more >
dotnet test does no longer accept a project path after ...
Describe the bug After updating NET 7.0.100 to NET 7.0.101 dotnet test does no longer accept a project path as an argument.
Read more >
Getting started: .NET Core with command line >
Getting Started with Using .NET Core with the .NET SDK command line. In this article, we will demonstrate getting started with
Read more >
Problems with .NET unit testing
Go to the directory with dotnet executable via terminal. Run "dotnet --version" command.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found