Search code examples
c#.net-corexunit.net

'dotnet test' doesn't discover any test


I have a project where I can not run the tests using dotnet test while my colleague can. The error message I get is

System.IO.FileNotFoundException: No test is available in C:\projects\...\bin\Debug\netcoreapp1.1\Test.AnalyzeFirmwareRollout.dll. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate and try again.

The project does have a reference to Microsoft.NET.Test.Sdk and the target framework is

<TargetFramework>netcoreapp1.1</TargetFramework>

in the csproj file. Any Ideas what could be going wrong here?


Solution

  • For running xUnit tests from command line, you will need the xunit.runner.console package.