Skip to content

How to determine that given .dll was build for an OS-specific TFM? #13668

@adamsitnik

Description

@adamsitnik

Hello everyone!

To tell the long story short, to make OS-specific monikers like net5.0-windows work with BenchmarkDotnet I need to detect (preferably using reflection) that given .dll is using an OS-specific moniker. (more details dotnet/BenchmarkDotNet#1535)

Is it somehow possible?

Repro:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0-windows</TargetFramework>
  </PropertyGroup>
</Project>

ILSpy gives me:

obraz

No information indicates that it's windows-specific.

cc @wli3 @buyaa-n

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions