JetBrains / TeamCity.VSTest.TestAdapter

Apache License 2.0
30 stars 14 forks source link

No test is available for NUnit #10

Closed oakio closed 6 years ago

oakio commented 6 years ago

Command dotnet test executed with message "No test is available in C:\temp\MyApp\build\bin\net461\MyApp.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again."

My configuration:

  <ItemGroup>
    <PackageReference Include="NUnit" Version="3.8.1" />
    <PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0-preview-20170923-02" />
    <PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.5" />
  </ItemGroup>

But when TeamCity.VSTest.TestAdapter package removed, all tests were successful found.

dtretyakov commented 6 years ago

@oakio, could you please report version of TeamCity .NET CLI plugin?

oakio commented 6 years ago

How to detect plugin version? All "Bundled plugins" in our Teamcity has version 47070.

PS: Also, I have tried run tests on my local machine, where is no TeamCity .NET CLI plugin, with same result.

dtretyakov commented 6 years ago

@oakio, do you use to execute dotnet test TeamCity .NET CLI plugin or run it via command line runner?

oakio commented 6 years ago

Via command line (powershell script aka build script).

NikolayPianikov commented 6 years ago

@oakio is it possible to share simple solution to reproduce? Did you manually change the output directory?

oakio commented 6 years ago

https://github.com/JetBrains/TeamCity.VSTest.TestAdapter/pull/11

In short, VSTestTestAdapterPath was incorrect when using Full .NET Framework (in my case TargetFramework=net461)

NikolayPianikov commented 6 years ago

Released here