-
Notifications
You must be signed in to change notification settings - Fork 486
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
SharpCompress 0.28.1 depends on System.Buffers 4.4.0, but NuGet transitively depends on 4.5.1 #591
Labels
Comments
Thanks i couldnt figure out the issue untill i found your post! |
I think this is the same bug as dotnet/runtime#1830. |
Thanks for this information. I can put a specific locked version against the .NET Standard 2.0 (and possibly 2.1) but unsure what versions to use. |
Downgrading to System.Memory 4.5.3 will be System.Buffers 4.4.0: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
Using SharpCompress 0.28.1 in a .NET 4.6.2 unit test project I get the following exception:
Analysis
Build output
The detailed MSBuild output of building the test project shows:
Dependency of SharpCompress 0.28.1 (.NET Standard 2.0) assembly
Disassembling the SharpCompress 0.28.1 assembly with ildasm shows that it indeed references
"System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"
:Dependency of SharpCompress 0.28.1 NuGet package
The SharpCompress 0.28.1 NuGet package depends on System.Buffers in the following way:
SharpCompress 0.28.1 → >= System.Memory 4.5.4 → >= System.Buffers 4.5.1
Signature of System.Buffers 4.4.0
Disassembling System.Buffers 4.4.0 NuGet package with ildasm, we get the following signature:
Signature of System.Buffers 4.5.1
Disassembling System.Buffers 4.5.1 NuGet package with ildasm, we get the following signature:
Conclusion
The .NET Standard 2.0 assembly of
SharpCompress.dll
which is contained in the SharpCompress 0.28.1 NuGet package depends onSystem.Buffers.dll
which is contained in the System.Buffers 4.4.0 NuGet package (assembly version 4.0.2.0).This creates a version conflict because the SharpCompress 0.28.1 NuGet package transitively depends on the System.Buffers 4.5.1 NuGet package (assembly version 4.0.3.0).
Workaround
I was able to work around this issue by forcing the System.Buffers NuGet version to 4.4.0:
The drawback is that it generates the following warning:
The text was updated successfully, but these errors were encountered: