Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THREAD_ABORT not properly set #4078

Closed
manfred-brands opened this issue Mar 22, 2022 · 0 comments · Fixed by #4079
Closed

THREAD_ABORT not properly set #4078

manfred-brands opened this issue Mar 22, 2022 · 0 comments · Fixed by #4079
Labels
Milestone

Comments

@manfred-brands
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants