No test found. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again

前端 未结 30 1756
广开言路
广开言路 2020-12-05 04:00

I am in the process of upgrading our existing solution to .Net 4.6.1 and have been unable to get our unit tests to run during a server build. Locally they run as expected an

相关标签:
30条回答
  • 2020-12-05 04:28

    This is a known issue for .Net 4.6 now.

    Unable to run .Net 4.6.x unit tests as part of a XAML TFS Build with TFS 2015 UPdate1 Source:https://connect.microsoft.com/VisualStudio/feedback/details/2245723

    Here is a similar question for you reference: Unable to run .Net 4.6 Unit tests of TFS 2015 XAML build server

    0 讨论(0)
  • 2020-12-05 04:28

    I was getting a similar issue and noticed somehow an app.config file had been added to my test project. Removing this config file fixed it for me.

    0 讨论(0)
  • 2020-12-05 04:28

    I solved this issue by installing NUnit3TestAdapter NuGet into my project (https://www.nuget.org/packages/NUnit3TestAdapter/).

    dotnet add package NUnit3TestAdapter --version 3.17.0
    

    My .csproj file

    <Project Sdk="Microsoft.NET.Sdk">
    
      <PropertyGroup>
        <TargetFramework>netcoreapp3.1</TargetFramework>
      </PropertyGroup>
    
      <ItemGroup>
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
        <PackageReference Include="NUnit" Version="3.12.0" />
        <PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
        <PackageReference Include="RestSharp" Version="106.11.7" />
      </ItemGroup>
    
    </Project>
    
    0 讨论(0)
  • 2020-12-05 04:31

    You can try to change your default processor architecture in your Test Setting from X86 to X64. In my case this was the problem.

    This happens if the platform target of your project under test is set to x64.

    0 讨论(0)
  • 2020-12-05 04:31

    In Visual Studio 2017 I just uninstall and reinstall NUnitTestAdapter or install new package like NUnitTestAdapter.WithFramework package and problem gone.

    0 讨论(0)
  • 2020-12-05 04:31

    In my case Reinstalling Nunit3 Adapter, Deleting temp folders, Changing architecture and nothing worked. Its because of the Daemon Resharper caused the problem.

    Add or Remove Programs> Find Resharper > Repair > Install again > Restart VS 
    

    That resolves the issues.

    0 讨论(0)
提交回复
热议问题