Skip to content

Test Explorer fails to show tests. Tests output: "The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)" #241

@daiplusplus

Description

@daiplusplus

Description

I cloned a private Git repo on my local machine. The solution comprises of several projects all targeting .NET 4.6.2. I built the solution which pulled-in some NuGet packages, including MSTest.TestAdapter, 1.1.18 and MSTest.TestFramework, 1.1.18. There is a test project in the solution with several [TestClass]/[TestMethod] tests. The solution builds successfully, however the Test Explorer window is empty. On a coworker's machine running VS2015 the Test Explorer is populated correctly.

In the Output window's Test output I see the following:

------ Discover test started ------
The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
========== Discover test finished: 0 found (0:00:00.1886778) ==========

Steps to reproduce

I have no specific reproduction steps - it happened spontaneously on my machine. Restarting VS, cleaning the project output and TestResults directory, and closing+reopening the Test Explorer window has no effect.

Expected behavior

The tests in the project should appear in Test Explorer.

Actual behavior

No tests appear in Test Explorer, and an error message in the Output window.

Environment

Please share additional details about the test environment.
Operating system, Build version of vstest.console, Package version of MSTest
framework and adapter

  • Windows 10 x64 Enterprise, Creators Update
  • Visual Studio 2017 Enterprise, 15.2
  • MSTest package version 1.1.18
  • Projects targeting .NET 4.6.2
  • I have two copies of vstest.console installed:
    • C:\Program Files (x86)\Microsoft Visual Studio 15.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe - 15.0.26228.0 - 142KB
    • C:\Program Files (x86)\Microsoft Visual Studio 15.0\Common7\IDE\Extensions\TestPlatform\vstest.console.exe - 15.0.0.0 - 117KB

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