Skip to content

TestFx 2.2.0-preview won't discover or run tests on VS16.8 #748

@Haplois

Description

@Haplois

Description

TestFx won't discover or run tests on .Net Framework 4.7 when using Visual Studio 16.8.

Steps to reproduce

  1. Create a Unit Test Project on .Net Framework 4.7.
  2. Verify that tests are getting discovered and run successfully.
  3. Update MSTest.TestAdapter and MSTest.TestFramework to version 2.2.0-preview-20201126-03.
  4. Run the tests using the Test Explorer Window.

Expected behavior

Tests are discovered and ran.

Actual behavior

---------- Starting test discovery for requested test run ----------
An exception occurred while test discoverer 'MSTestDiscoverer' was loading tests. Exception: Could not load type 'Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities.TypesToLoadAttribute' from assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
No test is available in C:\...\UnitTestProject9\UnitTestProject9\bin\Debug\UnitTestProject9.dll. Make sure that test discoverer & executors are registered, and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 0 Tests found in 8.1 sec ==========
---------- Starting test run ----------
An exception occurred while invoking executor 'executor://mstestadapter/v2': Could not load type 'Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities.TypesToLoadAttribute' from assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
========== Test run finished: 0 Tests run in 7.4 sec (0 Passed, 0 Failed, 0 Skipped) ==========

Environment

Visual Studio v16.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions