Skip to content

Proposal to streamline use of conditional compilation symbols #2484

@ErikEJ

Description

@ErikEJ

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions