Make sure dotnet test .\bin\Debug\net48\Tests.dll executes successfully
Delete UnitTest1.cs (single tests file from template)
dotnet test .\bin\Debug\net48\Tests.dll will fail with following error: Unable to find <...>.\bin\Debug\net48\Tests.deps.json. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk".
dotnet test Tests.csproj will fail with understandable message: No test is available in <...>\bin\Debug\net48\Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Expected behavior
dotnet test .\bin\Debug\net48\Tests.dll should tell that no test is available as dotnet test Tests.csproj does.
Tested with dotnet sdk 3.1 and 5.0
Steps to reproduce
dotnet new nunit
.dotnet test .\bin\Debug\net48\Tests.dll
executes successfullyUnitTest1.cs
(single tests file from template)dotnet test .\bin\Debug\net48\Tests.dll
will fail with following error:Unable to find <...>.\bin\Debug\net48\Tests.deps.json. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk".
dotnet test Tests.csproj
will fail with understandable message:No test is available in <...>\bin\Debug\net48\Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Expected behavior
dotnet test .\bin\Debug\net48\Tests.dll
should tell that no test is available asdotnet test Tests.csproj
does.