dotnet/buildtools

Add TargetFrameworkIdentifier to generated configuration.props

Closed this issue · 5 comments

Current we generate a configuration.props file which contains the following properties:

<When Condition="$(_parse_Configuration.Contains('-netcoreapp2.0-'))">
    <PropertyGroup>
        <TargetGroup>netcoreapp2.0</TargetGroup>
        <NuGetTargetMoniker>.NETCoreApp,Version=v2.0</NuGetTargetMoniker>
        <NuGetTargetMonikerShort>netcoreapp2.0</NuGetTargetMonikerShort>
    </PropertyGroup>
</When>

We should also set the TargetFrameworkIdentifier as external props/targets rely on this being set. E.g. Microsoft.NET.Test.Sdk which is used for xunit unit test explorer integration.

cc @weshaggard @ericstj @eerhardt

@ViktorHofer you do that by adding that property in the targets file in corefx https://github.com/dotnet/corefx/blob/master/tools-local/targetgroups.props. All the generated configuration stuff does is copy over those properties.

Thanks to Wes' reply, closing this issue

Why do you do close the issue when it hasn't yet been fixed??

That's actually not a buildtools issue. You control this yourself by what you put in the targetgroups. Any metadata on the configuration system propeties will be generated as properties in the generated configuration.props files.