Skip to content

THREAD_ABORT not properly set #4078

@manfred-brands

Description

@manfred-brands

This was detected when backporting this to 3.13-dev.

As part of #3984 the following line was replaced in Directory.Build.props

<DefineConstants Condition="'$(TargetFramework)' != 'netstandard2.0'
                            and '$(TargetFramework)' != 'netcoreapp2.1'
                            and '$(TargetFramework)' != 'netcoreapp3.1'
                            and '$(TargetFramework)' != 'net5.0'
                            and '$(TargetFramework)' != 'net5.0-windows'">$(DefineConstants);THREAD_ABORT</DefineConstants>

With:

 <DefineConstants Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">$(DefineConstants);THREAD_ABORT</DefineConstants>

Unfortunately TargetFrameworkIdentifier is not yet set when Directory.Build.props is parsed, but only later in Microsoft.NET.TargetFrameworkInference.targets

Then net effect is that THREAD_ABORT is never set.
This is not detected by unit test because we don't test Thread.Abort unless the symbol is set.

Metadata

Metadata

Assignees

No one assigned

    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