dotnet-test does not find dotnet-test-xunit executable
See original GitHub issueSteps 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": [
"dnxcore50",
"portable-net451+win8"
]
}
},
"testRunner": "xunit"
}
using Xunit;
namespace ConsoleApplication
{
public class Test
{
[Fact]
public void ShouldFail()
{
Assert.True(false);
}
}
}
Attached full repro project and lock file. sni-test.zip
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:
- Created 7 years ago
- Reactions:5
- Comments:9 (6 by maintainers)
Top 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 > xUnit.net
Getting Started with xUnit.net. Using .NET Core with the .NET SDK command line. In this article, we will demonstrate getting started with xUnit.net...
Read more >Problems with .NET unit testing
Go to the directory with dotnet executable via terminal. Run "dotnet --version" command.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
restore with --infer-runtimes to get unblocked. @livarcocc was taking a look into root caus.
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.