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

Proposal to streamline use of conditional compilation symbols #2484

Closed
ErikEJ opened this issue May 6, 2024 · 3 comments · Fixed by #2486
Closed

Proposal to streamline use of conditional compilation symbols #2484

ErikEJ opened this issue May 6, 2024 · 3 comments · Fixed by #2486

Comments

@ErikEJ
Copy link
Contributor

ErikEJ commented May 6, 2024

With the recent removal of NETSTANDARD support, these symbols in use can be simplified / rephrased:

!NETFRAMEWORK => NET6_0_OR_GREATER
!NET50_OR_LATER => NETFRAMEWORK
!NET6_0_OR_GREATER => NETFRAMEWORK
NET7_0_OR_GREATER => NET8_0_OR_GREATER
!NET7_0_OR_GREATER => !NET8_0_OR_GREATER
NETCOREAPP => NET6_0_OR_GREATER
net462 => NETFRAMEWORK

This will result in the following symbols being present in the code base:

NETFRAMEWORK
NET6_0_OR_GREATER
NET8_0_OR_GREATER

!NET8_0_OR_GREATER (can be removed later, when .NET 6 support is dropped)
NET6_0 (can be removed later, when .NET 6 support is dropped)

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives#conditional-compilation

@JRahnama JRahnama added the 🆕 Triage Needed For new issues, not triaged yet. label May 6, 2024
@DavoudEshtehari DavoudEshtehari self-assigned this May 6, 2024
ErikEJ added a commit to ErikEJ/SqlClient that referenced this issue May 7, 2024
@ErikEJ
Copy link
Contributor Author

ErikEJ commented May 7, 2024

@roji Wonder if these can be replaced? (Current targets are .NET 6 and .NET 8)

NET7_0_OR_GREATER => NET8_0_OR_GREATER

!NET7_0_OR_GREATER => !NET8_0_OR_GREATER

@roji
Copy link
Member

roji commented May 7, 2024

@ErikEJ yeah, that makes sense... If net7.0 isn't being targeted (and it's just about to go out of support), then there's no reason to have NET7_0_OR_GREATER any more.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented May 7, 2024

Thanks, @roji , I have updated specs above accordingly

@kf-gonzalez2 kf-gonzalez2 removed the 🆕 Triage Needed For new issues, not triaged yet. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

5 participants