testfx icon indicating copy to clipboard operation
testfx copied to clipboard

MSTest.TestAdapter should target newer TargetFrameworks

Open ericstj opened this issue 3 years ago • 3 comments

Description

Today MSTest.TestAdapter targets old and out of support target frameworks, resulting in a lot of unnecessary dependencies being downloaded.

Steps to reproduce

Reference MSTest.TestAdapter in a net6.0 project.

Expected behavior

No additional packages downloaded since all the API needed by MSTest.TestAdapter is present in the framework.

Actual behavior

Many packages downloaded (100s) due to using the older package dependency groups that bring down the old NETStandard.Library package reference.

This can also be observed in the project.assets.json

Environment

Repro project:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="MSTest.TestAdapter" Version="2.2.9" />
  </ItemGroup>

</Project>

Repro steps

  1. dotnet restore
  2. examine project.assets.json

ericstj avatar Apr 18 '22 22:04 ericstj

Thank you for reporting this, we are aware of this issue. Unfortunately we cannot break compatibility with older TFMs, so we are adding newer frameworks to our packages slowly. I'll keep this assigned to myself so I can monitor its progress.

Haplois avatar Apr 21 '22 00:04 Haplois

Perhaps it is better to solve it with V3 and v2 leave for hotfixes?

SymbioticKilla avatar Apr 22 '22 13:04 SymbioticKilla

Yes, that's the plan.

Haplois avatar Apr 29 '22 10:04 Haplois

This will be available in 2.3.0

Evangelink avatar Sep 12 '22 18:09 Evangelink