Skip to content

buildMultiTargeting unintentionally makes a package compatible with every framework #14338

@Varorbc

Description

@Varorbc

NuGet Product Used

dotnet.exe

Product Version

9.0.300

Worked before?

No response

Impact

None

Repro Steps & Context

The target frameworks supported by Microsoft.NET.Test.Sdk are net8.0 and net462, and the target framework of my project is net6.0. When building, the warning of nu1701 should be generated, but there is no warning now.

1.dotnet new console -f net6.0 -n Test
2.dotnet add package Microsoft.NET.Test.Sdk --version 17.14.0
3.dotnet build

Verbose Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Functionality:RestorePriority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Type:DCRDesign Change Request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions