mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
[PR #1135] Consolidate NETFRAMEWORK/NETSTANDARD compile flags into LEGACY_DOTNET #1569
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/1135
State: closed
Merged: Yes
Consolidate compile flags for NETFRAMEWORK and NETSTANDARD
Summary of Changes
This PR consolidates scattered
NETFRAMEWORKandNETSTANDARD2_0compile flags into a single, clearerLEGACY_DOTNETconstant.What Changed
Added
LEGACY_DOTNETcompile constant in SharpCompress.csprojnet48andnetstandard20targetsReplaced 41 occurrences across 25 files:
#if !NETFRAMEWORK && !NETSTANDARD2_0→#if !LEGACY_DOTNET#if NETFRAMEWORK || NETSTANDARD2_0→#if LEGACY_DOTNET#if !NETSTANDARD2_0 && !NETSTANDARD2_1 && !NETFRAMEWORK→#if !LEGACY_DOTNET#if NETFRAMEWORK || NETSTANDARD→#if LEGACY_DOTNET#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER→#if !LEGACY_DOTNETAdditional simplifications:
NETCF(NET Compact Framework) flag - not a supported targetNET60_OR_GREATER→NET6_0_OR_GREATERNET6_0_OR_GREATER→NET8_0_OR_GREATER(5 occurrences in 3 files)Benefits
LEGACY_DOTNETcommunicates purpose better than framework checksNET8_0_OR_GREATERaligns with actual project targets (net8.0, net10.0)Verification ✅
LEGACY_DOTNET)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.