Skip to content

Test Explorer: No suitable test runtime provider was found #1129

Closed
nanoframework/nanoFramework.DependencyInjection
#10
@bytewizer

Description

@bytewizer

Tool

Visual Studio extension

Description

After installing Microsoft Visual Studio Professional 2022 (64-bit) Version 17.3.1 and updating to the latest .NET nanoFramework Extension Version: 2022.2.0.33 Test Explorer will fail with a 'No suitable test runtime provider was found' error message.

Failed Log:

Log level is set to Informational (Default).
Connected to test environment '< Local Windows Environment >'
Error opening test data: Data schema version was 30, expected 31.
Test data was cleared upon opening.
Test data store opened in 0.017 sec.
Loaded 0 test records from the solution cache in 0.222 sec.
Starting test discovery for requested test run
Using automatically detected runsettings file(s). To learn more visit https://aka.ms/vs-runsettings.
Tests in projects that reference runsettings file 'C:\Repos\nanoFramework.DependencyInjection\tests\nano.runsettings' will not be discovered in parallel because it specifies the value for 'MaxCpuCount' as '1'.
========== Starting test discovery ==========
Test run detected DLL(s) which would use different framework and platform versions. Following DLL(s) do not match current settings, which are .NETFramework,Version=v4.0 framework and X64 platform.
NFUnitTest.dll would use Framework .NETnanoFramework,Version=v1.0 and Platform X64.
Go to https://aka.ms/tp/vstest/multitargetingdoc?view=vs-2019 for more details on managing these settings.
[nanoTestAdapter]: Getting ready to discover tests...
[nanoTestAdapter]: Settings parsed
[nanoTestAdapter]:   New file processed: C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\NFUnitTest.dll
[nanoTestAdapter]:   Adding 57 new tests
[nanoTestAdapter]: Finished adding files
No suitable test runtime provider was found:
Skipping source: C:\Repos\nanoFramework.DependencyInjection\nanoFramework.DependencyInjection\bin\Debug\nanoFramework.DependencyInjection.dll (.NETnanoFramework,Version=v1.0, X64)

Successful Log:

Log level is set to Informational (Default).
Connected to test environment '< Local Windows Environment >'
Test data store opened in 0.017 sec.
Loaded 0 test records from the solution cache in 0.213 sec.
Starting test discovery for requested test run
Using automatically detected runsettings file(s). To learn more visit https://aka.ms/vs-runsettings.
Tests in projects that reference runsettings file 'C:\Repos\nanoFramework.DependencyInjection\tests\nano.runsettings' will not be discovered in parallel because it specifies the value for 'MaxCpuCount' as '1'.
========== Starting test discovery ==========
Test run detected DLL(s) which would use different framework and platform versions. Following DLL(s) do not match current settings, which are .NETFramework,Version=v4.0 framework and X64 platform.
NFUnitTest.dll would use Framework .NETnanoFramework,Version=v1.0 and Platform X64.
Go to https://aka.ms/tp/vstest/multitargetingdoc?view=vs-2019 for more details on managing these settings.
[nanoTestAdapter]: Getting ready to discover tests...
[nanoTestAdapter]: Settings parsed
[nanoTestAdapter]:   New file processed: C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\NFUnitTest.dll
[nanoTestAdapter]:   Adding 57 new tests
[nanoTestAdapter]: Finished adding files
========== Test discovery finished: 57 Tests found in 1.6 sec ==========
Using automatically detected runsettings file(s). To learn more visit https://aka.ms/vs-runsettings.
========== Starting test run ==========
Test run detected DLL(s) which would use different framework and platform versions. Following DLL(s) do not match current settings, which are .NETFramework,Version=v4.0 framework and X64 platform.
NFUnitTest.dll would use Framework .NETnanoFramework,Version=v1.0 and Platform X64.
Go to https://aka.ms/tp/vstest/multitargetingdoc?view=vs-2019 for more details on managing these settings.
[nanoTestAdapter]: Getting ready to run tests...
[nanoTestAdapter]: Settings parsed
[nanoTestAdapter]: Test sources enumerated
[nanoTestAdapter]: Test group is 'C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\NFUnitTest.dll'
[nanoTestAdapter]: Setting up test runner in *** nanoCLR WIN32***
[nanoTestAdapter]: Timeout set to 120000ms
[nanoTestAdapter]: Processing assemblies to load into test runner...
[nanoTestAdapter]: Parameters to pass to nanoCLR: < -load "C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\mscorlib.pe" -load "C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\nanoFramework.DependencyInjection.pe" -load "C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\nanoFramework.TestFramework.pe" -load "C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\nanoFramework.UnitTestLauncher.pe" -load "C:\Repos\nanoFramework.DependencyInjection\tests\bin\Debug\NFUnitTest.pe">
[nanoTestAdapter]: Found nanoCLR Win32: C:\Repos\nanoFramework.DependencyInjection\packages\nanoFramework.TestFramework.1.0.209\lib\net48\nanoFramework.nanoCLR.exe
[nanoTestAdapter]: Launching process with nanoCLR (from C:\Repos\nanoFramework.DependencyInjection\packages\nanoFramework.TestFramework.1.0.209\lib\net48\nanoFramework.nanoCLR.exe)
[nanoTestAdapter]: nanoCLR started @ process ID: 7204
[nanoTestAdapter]: Parsing test results...
[nanoTestAdapter]: 
.NET nanoFramework nanoCLR WIN32 v1.8.0.440+7de2295208

How to reproduce

  1. Fork the 'nanoFramework.DependencyInjection' repo and run test explorer. This should work as expected and all tests will pass.
  2. Add the following code to the project. (Any major changes to the project code will break test explorer)
namespace nanoFramework.DependencyInjection
{
    internal static class BreakMe
    {
        public static bool IsBroken()
        {
            return false;
        }
    }
}
  1. Run test explorer again and you will get a 'No suitable test runtime provider was found' error message.

Expected behaviour

This should work as expected and all tests will pass.

Screenshots

No response

Aditional context

Microsoft Visual Studio Professional 2022 (64-bit) Version 17.3.1
.NET nanoFramework Extension Version: 2022.2.0.33

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions