Why netstandard2.0 shows warning for NUnit3TestAdapter but netstandard1.6 does not?

531 Views Asked by At

NUnit3TestAdapter nuget package shows warning message in reference when target framework is netstandard2.0 but when project target framework is netstandar1.6 it does not show the warning. I would like to understand the difference in this case.

Warning Message is :

Package 'NUnit3TestAdapter 3.12.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

I have c# nunit test project where I need to include NUnit3TestAdapter nuget package. I tried to supress the warning but it's not a solution I feel.

my_project.csproj file content

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

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0;netstandard1.6</TargetFrameworks>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
    <PackageReference Include="NUnit" Version="3.11.0" />
    <PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
  </ItemGroup>

</Project>

I expect NUnit3TestAdapter should not show me the warning when netstandard2.0 if it's not showing for netstandard1.6 target framework.

0

There are 0 best solutions below