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.
This was detected when backporting this to 3.13-dev.
As part of #3984 the following line was replaced in
Directory.Build.propsWith:
Unfortunately
TargetFrameworkIdentifieris not yet set whenDirectory.Build.propsis parsed, but only later inMicrosoft.NET.TargetFrameworkInference.targetsThen net effect is that
THREAD_ABORTis never set.This is not detected by unit test because we don't test
Thread.Abortunless the symbol is set.