Skip to content

mstest 3.4.1 does not discover a method from unit tests in visual studio when returning a Task with multiple frameworks #3033

Closed
@fforjan

Description

@fforjan

Describe the bug

mstest 3.4.1 does not discover a method from unit tests in visual when returning a Task with multiple frameworks

[Warning] [MSTest][Discovery][C:\Users\ISYS36005\source\repos\TestProject1\bin\Debug\net6.0-windows\TestProject1.dll] MSTestAdapter failed to discover tests in class 'TestProject1.UnitTest1' of assembly 'source\repos\TestProject1\bin\Debug\net6.0-windows\TestProject1.dll' because Method 'get_DataRow' in type 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation' from assembly 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation..

Steps To Reproduce

Create a new unit tests project in a new solution with a method returning a task :
image
notice that the frameworks targets both net472 and net6.0-windows

Expected behavior

Both tests in both framework should be discovered and be able to execute

Actual behavior

net6.0-windows is not discovered

Additional context

Tested in Visual Studio 2022 17.10.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions