-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Replace usage of out-of-support TFM compiler directives #101672
Replace usage of out-of-support TFM compiler directives #101672
Conversation
... and directives for TFMs that we don't target anymore in main. Replaces the following directives with `NET` or `!NET`: - `#if NETCOREAPP2*` - `#if !NETCOREAPP2*` - `#if NETCOREAPP3*` - `#if !NETCOREAPP3*` - `#if NET5*` - `#if !NET5*` - `#if NET6*` - `#if !NET6*` - `#if NET7*` - `#if !NET7*`
Tagging subscribers to this area: @dotnet/area-meta |
Is there a reason why you have not replaced |
Some of the test failures look related to the change. |
Yeah, 300+ hits. i wanted to keep this scoped on the other directives. I can send another PR to then replace NETCOREAPP with NET if we want to go that direction. Another reason for not doing this as part of this PR is that we aren't consistent between using NETCOREAPP vs NET in general, i.e. TFM properties still use NetCoreAppX instead of just NetX and I didn't want to submit a questionable change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind sharing why this change is being made? Why did the old directives lose their value?
Assuming the CI is all good, LGTM.
The main branch doesn't benefit from the distinction between NETCOREAPP2 vs NETCOREAPP3 vs NET5 vs NET6 vs NET7 as non of those TFMs are built anymore. Most of them are already out-of-support or soon will be. From a code point perspective, differentiating between .NET Framework, modern .NET and specific modern .NET versions that we target and build in main is sufficient. Or to rephrase, |
* Replace usage of out-of-support TFM compiler directives ... and directives for TFMs that we don't target anymore in main. Replaces the following directives with `NET` or `!NET`: - `#if NETCOREAPP2*` - `#if !NETCOREAPP2*` - `#if NETCOREAPP3*` - `#if !NETCOREAPP3*` - `#if NET5*` - `#if !NET5*` - `#if NET6*` - `#if !NET6*` - `#if NET7*` - `#if !NET7*` * Update EmitterTests.cs
* Replace usage of out-of-support TFM compiler directives ... and directives for TFMs that we don't target anymore in main. Replaces the following directives with `NET` or `!NET`: - `#if NETCOREAPP2*` - `#if !NETCOREAPP2*` - `#if NETCOREAPP3*` - `#if !NETCOREAPP3*` - `#if NET5*` - `#if !NET5*` - `#if NET6*` - `#if !NET6*` - `#if NET7*` - `#if !NET7*` * Update EmitterTests.cs
* Replace usage of out-of-support TFM compiler directives ... and directives for TFMs that we don't target anymore in main. Replaces the following directives with `NET` or `!NET`: - `#if NETCOREAPP2*` - `#if !NETCOREAPP2*` - `#if NETCOREAPP3*` - `#if !NETCOREAPP3*` - `#if NET5*` - `#if !NET5*` - `#if NET6*` - `#if !NET6*` - `#if NET7*` - `#if !NET7*` * Update EmitterTests.cs
... and directives for TFMs that we don't target anymore in main.
Replaces the following directives with
NET
or!NET
:#if NETCOREAPP2*
#if !NETCOREAPP2*
#if NETCOREAPP3*
#if !NETCOREAPP3*
#if NET5*
#if !NET5*
#if NET6*
#if !NET6*
#if NET7*
#if !NET7*