-
Notifications
You must be signed in to change notification settings - Fork 511
Added Net7.0 / Net 6.0 / Net 5.0 and NetStandard2.1 #1227
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // Compatibility shim for frameworks that don't expose MemberNotNullAttribute | ||
| #if NETSTANDARD2_1 || LEGACY_DOTNET | ||
| using System; | ||
|
|
||
| namespace System.Diagnostics.CodeAnalysis | ||
| { | ||
| [AttributeUsage( | ||
| AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor, | ||
| AllowMultiple = true | ||
| )] | ||
| internal sealed class MemberNotNullAttribute : Attribute | ||
| { | ||
| public MemberNotNullAttribute(string member) { } | ||
|
|
||
| public MemberNotNullAttribute(params string[] members) { } | ||
| } | ||
| } | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
| <AssemblyVersion>0.0.0.0</AssemblyVersion> | ||
| <FileVersion>0.0.0.0</FileVersion> | ||
| <Authors>Adam Hathcock</Authors> | ||
| <TargetFrameworks>net48;netstandard2.0;net8.0;net10.0</TargetFrameworks> | ||
| <TargetFrameworks>net48;netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks> | ||
| <AssemblyName>SharpCompress</AssemblyName> | ||
| <AssemblyOriginatorKeyFile>../../SharpCompress.snk</AssemblyOriginatorKeyFile> | ||
| <SignAssembly>true</SignAssembly> | ||
|
|
@@ -17,7 +17,7 @@ | |
| <Copyright>Copyright (c) 2025 Adam Hathcock</Copyright> | ||
| <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute> | ||
| <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> | ||
| <Description>SharpCompress is a compression library for NET 4.8/NET Standard 2.0/NET 8.0/NET 10.0 that can unrar, decompress 7zip, decompress xz, zip/unzip, tar/untar lzip/unlzip, bzip2/unbzip2 and gzip/ungzip with forward-only reading and file random access APIs. Write support for zip/tar/bzip2/gzip is implemented.</Description> | ||
| <Description>SharpCompress is a compression library for NET 4.8/NET Standard 2.0/NET Standard 2.1/NET 5.0/NET 6.0/NET 7.0/NET 8.0/NET 9.0/NET 10.0 that can unrar, decompress 7zip, decompress xz, zip/unzip, tar/untar lzip/unlzip, bzip2/unbzip2 and gzip/ungzip with forward-only reading and file random access APIs. Write support for zip/tar/bzip2/gzip is implemented.</Description> | ||
| <PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
| <IncludeSymbols>true</IncludeSymbols> | ||
| <DebugType>embedded</DebugType> | ||
|
|
@@ -28,14 +28,14 @@ | |
| <EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
| <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(TargetFramework)' == 'net48' Or '$(TargetFramework)' == 'netstandard2.0' "> | ||
| <PropertyGroup Condition=" '$(TargetFramework)' == 'net48' Or '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netstandard2.1' "> | ||
| <DefineConstants>$(DefineConstants);LEGACY_DOTNET</DefineConstants> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net10.0' "> | ||
| <PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net10.0' "> | ||
| <IsTrimmable>true</IsTrimmable> | ||
| <IsAotCompatible>true</IsAotCompatible> | ||
| </PropertyGroup> | ||
|
Comment on lines
+34
to
37
|
||
| <ItemGroup Condition=" '$(TargetFramework)' == 'net48' Or '$(TargetFramework)' == 'netstandard2.0' "> | ||
| <ItemGroup Condition=" '$(TargetFramework)' == 'net48' Or '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netstandard2.1' "> | ||
| <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" /> | ||
| <PackageReference Include="System.Text.Encoding.CodePages" /> | ||
| <PackageReference Include="System.Buffers" /> | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
.NET Standard 2.1 is being marked as LEGACY_DOTNET, which may cause confusion since .NET Standard 2.1 has Span and other modern APIs. The code already handles this with conditional checks like
!LEGACY_DOTNET || NETSTANDARD2_1throughout the codebase, but this creates complexity. Consider whether netstandard2.1 should be excluded from LEGACY_DOTNET definition, or alternatively, verify that all LEGACY_DOTNET usages correctly account for netstandard2.1's capabilities with explicit NETSTANDARD2_1 checks where needed.