microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
897 stars 322 forks source link

"No suitable test runtime provider found for this run." on MSTestV2 project. #2277

Closed aukevin closed 4 years ago

aukevin commented 4 years ago

Description

The vstest.console.exe that is built from this repository differs with the behavior of the vstest.console.exe that ships with VS2019 when passed an MSTestV2 dll on my machine. The one that ships with VS2019 runs all tests from the test dll, while the one I built from the repo shows "No suitable test runtime provider found for this run.".

I believe this is probably a configuration issue, but had trouble finding resources. It looks like there is an existing thread with the same error regarding UWP test code. However, I do not believe this has the same root cause. If there were additional configuration steps I missed, please let me know.

Steps to reproduce

Step 1: Clone this repository, check out the rel/16.4 branch. Step 2: Build using build.cmd, verify that the build is green. Step 3: Run the following commands in Visual Studio Command prompt: image

Expected behavior

The built code (16.4.1-dev) should have ran the test code in largely the same way as the version that shipped with VS2019 (16.4) and at least run the tests.

Actual behavior

The behavior is shown in the screenshot - the built code could not find a suitable test runtime provider.

Diagnostic logs

TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.073, 794630572645, vstest.console.exe, FilePatternParser: The given file C:\Users\keau\source\repos\UnitTestProject\bin\Debug\UnitTestProject.dll is a full path. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.082, 794630645448, vstest.console.exe, TestPluginCache.DiscoverTestExtensions: finding test extensions in assemblies endswith: RuntimeProvider.dll TPluginInfo: Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities.TestRuntimePluginInformation TExtension: Microsoft.VisualStudio.TestPlatform.ObjectModel.Host.ITestRuntimeProvider TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.083, 794630658582, vstest.console.exe, TestPluginCache.GetExtensionPaths: Filtered extension paths: TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.086, 794630682270, vstest.console.exe, TestPluginCache.GetExtensionPaths: Added default extension paths: TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.086, 794630684078, vstest.console.exe, TestPluginCache.GetExtensionPaths: Added unfilterableExtensionPaths: TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.087, 794630697505, vstest.console.exe, AssemblyResolver.ctor: Creating AssemblyResolver with searchDirectories C:\Git\vstest\src\vstest.console\bin\Debug\net451\win7-x64 TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.088, 794630701593, vstest.console.exe, TestPluginCache.DiscoverTestExtensions: Discovering the extensions using extension path. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.088, 794630702671, vstest.console.exe, TestPluginCache.GetExtensionPaths: Filtered extension paths: TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.088, 794630703310, vstest.console.exe, TestPluginCache.GetExtensionPaths: Added default extension paths: TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.088, 794630703947, vstest.console.exe, TestPluginCache.GetExtensionPaths: Added unfilterableExtensionPaths: TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.088, 794630704584, vstest.console.exe, TestPluginCache.DiscoverTestExtensions: Discovering the extensions using allExtensionPaths: TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.091, 794630740597, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension: Resolving assembly. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.092, 794630742818, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension: Failed to load assembly. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.092, 794630746244, vstest.console.exe, CurrentDomain_AssemblyResolve: Resolving assembly 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension'. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.092, 794630747964, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension: Resolving assembly. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.092, 794630748669, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension: Resolved from cache. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.092, 794630749507, vstest.console.exe, CurrentDomain_AssemblyResolve: Resolving assembly 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension'. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.092, 794630750111, vstest.console.exe, CurrentDomainAssemblyResolve: Failed to resolve assembly 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension'. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.093, 794630753586, vstest.console.exe, CurrentDomainAssemblyResolve: Failed to resolve assembly 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension'. TpTrace Warning: 0 : 148928, 1, 2019/12/17, 15:47:19.100, 794630826294, vstest.console.exe, TestPluginDiscoverer: Failed to load extensions from file 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension.dll'. Skipping test extension scan for this file. Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension' ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.TestPluginCache.CurrentDomainAssemblyResolve(Object sender, AssemblyResolveEventArgs args) in C:\Git\vstest\src\Microsoft.TestPlatform.Common\ExtensionFramework\TestPluginCache.cs:line 533 at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformAssemblyResolver.AssemblyResolverEvent(Object sender, Object eventArgs) in C:\Git\vstest\src\Microsoft.TestPlatform.PlatformAbstractions\net451\Runtime\PlatformAssemblyResolver.cs:line 74 at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.TestPluginDiscoverer.GetTestExtensionsFromFiles[TPluginInfo,TExtension](String[] files, Dictionary`2 pluginInfos) in C:\Git\vstest\src\Microsoft.TestPlatform.Common\ExtensionFramework\TestPluginDiscoverer.cs:line 145

TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630832143, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter: Resolving assembly. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630833549, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter: Failed to load assembly. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630834485, vstest.console.exe, CurrentDomain_AssemblyResolve: Resolving assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter'. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630835985, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter: Resolving assembly. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630836617, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter: Resolved from cache. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630837282, vstest.console.exe, CurrentDomain_AssemblyResolve: Resolving assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter'. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630837872, vstest.console.exe, CurrentDomainAssemblyResolve: Failed to resolve assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter'. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.101, 794630839111, vstest.console.exe, CurrentDomainAssemblyResolve: Failed to resolve assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter'. TpTrace Warning: 0 : 148928, 1, 2019/12/17, 15:47:19.102, 794630842019, vstest.console.exe, TestPluginDiscoverer: Failed to load extensions from file 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter.dll'. Skipping test extension scan for this file. Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.TestPluginCache.CurrentDomainAssemblyResolve(Object sender, AssemblyResolveEventArgs args) in C:\Git\vstest\src\Microsoft.TestPlatform.Common\ExtensionFramework\TestPluginCache.cs:line 533 at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformAssemblyResolver.AssemblyResolverEvent(Object sender, Object eventArgs) in C:\Git\vstest\src\Microsoft.TestPlatform.PlatformAbstractions\net451\Runtime\PlatformAssemblyResolver.cs:line 74 at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.TestPluginDiscoverer.GetTestExtensionsFromFiles[TPluginInfo,TExtension](String[] files, Dictionary`2 pluginInfos) in C:\Git\vstest\src\Microsoft.TestPlatform.Common\ExtensionFramework\TestPluginDiscoverer.cs:line 145

TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.106, 794630882479, vstest.console.exe, TestPluginCache: Discovered the extensions using extension path ''. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.106, 794630888020, vstest.console.exe, TestPluginCache: Discoverers are ''. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.106, 794630889233, vstest.console.exe, TestPluginCache: Executors are ''. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.107, 794630891530, vstest.console.exe, TestPluginCache: Setting providers are ''. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.107, 794630892705, vstest.console.exe, TestPluginCache: Loggers are ''. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.116, 794630987555, vstest.console.exe, RunTestsArgumentProcessor:Execute: Test run is starting. TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.116, 794630988669, vstest.console.exe, RunTestsArgumentProcessor:Execute: Queuing Test run. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.118, 794631007338, vstest.console.exe, TestRequestManager.RunTests: run tests started. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.187, 794631702165, vstest.console.exe, AssemblyMetadataProvider.GetFrameWork: Determined framework:'.NETFramework,Version=v4.7.2' for source: 'C:\Users\keau\source\repos\UnitTestProject\bin\Debug\UnitTestProject.dll' TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.187, 794631704074, vstest.console.exe, Determined framework for all sources: .NETFramework,Version=v4.7.2 TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.190, 794631731076, vstest.console.exe, AssemblyMetadataProvider.GetArchitecture: Determined architecture:AnyCPU info for assembly: C:\Users\keau\source\repos\UnitTestProject\bin\Debug\UnitTestProject.dll TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.191, 794631743340, vstest.console.exe, Determined platform for all sources: X86 TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.194, 794631771505, vstest.console.exe, Compatible sources list : TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.194, 794631772449, vstest.console.exe, C:\Users\keau\source\repos\UnitTestProject\bin\Debug\UnitTestProject.dll TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.199, 794631824942, vstest.console.exe, InferRunSettingsHelper.IsTestSettingsEnabled: Unable to navigate to RunSettings/MSTest. Current node: RunSettings TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.202, 794631846516, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestPlatform.Fakes, Version=16.0.0.0, Culture=neutral: Resolving assembly. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.202, 794631848041, vstest.console.exe, AssemblyResolver.OnResolve: Microsoft.VisualStudio.TestPlatform.Fakes, Version=16.0.0.0, Culture=neutral: Failed to load assembly. TpTrace Information: 0 : 148928, 1, 2019/12/17, 15:47:19.202, 794631851349, vstest.console.exe, Failed to create Fakes Configurator. Reason:System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.Fakes, Version=16.0.0.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.TestPlatform.Fakes, Version=16.0.0.0, Culture=neutral' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.VisualStudio.TestPlatform.Common.Utilities.FakesUtilities.TryGetFakesDataCollectorConfigurator(Func`2& configurator) in C:\Git\vstest\src\Microsoft.TestPlatform.Common\Utilities\FakesUtilities.cs:line 146

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

TpTrace Error: 0 : 148928, 1, 2019/12/17, 15:47:19.228, 794632111154, vstest.console.exe, TestPlatform.CreateTestRunRequest: No suitable testHostProvider found for runsettings :

C:\Git\vstest\src\vstest.console\bin\Debug\net451\win7-x64\TestResults X86 .NETFramework,Version=v4.7.2 False False

TpTrace Error: 0 : 148928, 1, 2019/12/17, 15:47:19.230, 794632133977, vstest.console.exe, TestRequestManager.RunTests: failed to run tests: Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: No suitable test runtime provider found for this run. at Microsoft.VisualStudio.TestPlatform.Client.TestPlatform.ThrowExceptionIfTestHostManagerIsNull(ITestRuntimeProvider testHostManager, String settingXml) in C:\Git\vstest\src\Microsoft.TestPlatform.Client\TestPlatform.cs:line 199 at Microsoft.VisualStudio.TestPlatform.Client.TestPlatform.CreateTestRunRequest(IRequestData requestData, TestRunCriteria testRunCriteria, TestPlatformOptions options) in C:\Git\vstest\src\Microsoft.TestPlatform.Client\TestPlatform.cs:line 149 at Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers.TestRequestManager.RunTests(IRequestData requestData, TestRunCriteria testRunCriteria, ITestRunEventsRegistrar testRunEventsRegistrar, TestPlatformOptions options) in C:\Git\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs:line 581 TpTrace Error: 0 : 148928, 1, 2019/12/17, 15:47:19.231, 794632139385, vstest.console.exe, ExecuteArgumentProcessor: failed to execute argument process: Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: No suitable test runtime provider found for this run. at Microsoft.VisualStudio.TestPlatform.Client.TestPlatform.ThrowExceptionIfTestHostManagerIsNull(ITestRuntimeProvider testHostManager, String settingXml) in C:\Git\vstest\src\Microsoft.TestPlatform.Client\TestPlatform.cs:line 199 at Microsoft.VisualStudio.TestPlatform.Client.TestPlatform.CreateTestRunRequest(IRequestData requestData, TestRunCriteria testRunCriteria, TestPlatformOptions options) in C:\Git\vstest\src\Microsoft.TestPlatform.Client\TestPlatform.cs:line 149 at Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers.TestRequestManager.RunTests(IRequestData requestData, TestRunCriteria testRunCriteria, ITestRunEventsRegistrar testRunEventsRegistrar, TestPlatformOptions options) in C:\Git\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs:line 597 at Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers.TestRequestManager.RunTests(TestRunRequestPayload testRunRequestPayload, ITestHostLauncher testHostLauncher, ITestRunEventsRegistrar testRunEventsRegistrar, ProtocolConfig protocolConfig) in C:\Git\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs:line 289 at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentExecutor.RunTests(IEnumerable`1 sources) in C:\Git\vstest\src\vstest.console\Processors\RunTestsArgumentProcessor.cs:line 199 at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentExecutor.Execute() in C:\Git\vstest\src\vstest.console\Processors\RunTestsArgumentProcessor.cs:line 173 at Microsoft.VisualStudio.TestPlatform.CommandLine.Executor.ExecuteArgumentProcessor(IArgumentProcessor processor, Int32& exitCode) in C:\Git\vstest\src\vstest.console\CommandLine\Executor.cs:line 332 TpTrace Verbose: 0 : 148928, 1, 2019/12/17, 15:47:19.232, 794632152685, vstest.console.exe, Executor.Execute: Exiting with exit code of 1

Environment

This was running on Windows 10 Enterprise, OS build 18363.535. The version of vstest.console used is from the rel/16.4 branch of this repository.

aukevin commented 4 years ago

The test project is no secret, it is quite simple:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="MSTest.TestAdapter" version="2.0.0" targetFramework="net472" />
  <package id="MSTest.TestFramework" version="2.0.0" targetFramework="net472" />
</packages>
namespace UnitTestProject
{
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        [DataRow(1, 1, 2)]
        [DataRow(12, 30, 42)]
        [DataRow(14, 1, 14)]
        public void Test_Add(int a, int b, int expected)
        {
            var actual = a + b;
            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void TestBasicFailure()
        {
            Assert.AreEqual(3, 2+2);
        }
    }
}
aukevin commented 4 years ago

It was pointed out that I was running the wrong vstest.console.exe. The correct one can be found here, so I am closing this issue. https://github.com/Microsoft/vstest-docs/blob/master/docs/contribute.md#test