Skip to content

[Question] Why test libraries that target single TFM use TargetFrameworkS (plural)? #47155

@adamsitnik

Description

@adamsitnik

Very often when I try to run all tests without specifying TFM, I get the following error:

C:\Projects\runtime\src\libraries\System.Diagnostics.TraceSource\tests> dotnet run -c Release
Unable to run your project
Your project targets multiple frameworks. Specify which framework to run using '--framework'.

Can $(NetCoreAppCurrent) be more than one moniker?

Is there anything that stops us from applying the following change to all test projects?

- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework> 

cc @ViktorHofer @Anipik

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Infrastructure-librariesquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions