-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Invalid assemblyBinding redirects lead to FileLoadException when using System.Buffers in certain scenario #26600
Labels
Milestone
Comments
knocte
referenced
this issue
in nblockchain/geewallet
Sep 29, 2018
Hopefully this works as a workaround of the following issue: https://github.com/dotnet/corefx/issues/30642
knocte
referenced
this issue
in diginex/gwallet
Sep 29, 2018
Hopefully this works as a workaround of the following issue: https://github.com/dotnet/corefx/issues/30642 (Which started happening after upgrading NBitcoin, which implied an upgrade of the System.Buffers dependency.)
knocte
referenced
this issue
in nblockchain/geewallet
Oct 3, 2018
This lets us drop the CryptSharpOfficial dependency (thanks to MetacoSA/NBitcoin#444), but requires us to replace NBitcoin.Litecoin with the new NBitcoin.Altcoins. CryptSharpOfficial dep has some nuget problems when restoring in the frontend branch, plus I trust it less than NBitcoin. NOTE: the binding redirect is needed because otherwise we would see exceptions similar to the one mentioned here[0]. (This was done already in [1], but we had to revert it [2] because I found a problem with NBitcoin+.NETStandard that I fixed in this other PR [3].) [0] https://github.com/dotnet/corefx/issues/30642 [1] 6cf138c [2] c569bb2 [3] MetacoSA/NBitcoin#545
This is a duplicate of https://github.com/dotnet/corefx/issues/32457. I tried out the repro and it is fixed with the latest System.IO.PipeLines package: 4.5.3. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This bug has been found by @NickCraver and @mgravell during port of StackOverflow to .NET Core
The repo can be found here: https://github.com/adamsitnik/Pipelines.Sockets.Unofficial/blob/repro/repro/Repro/Program.cs
How to reproduce:
Output:
Some more details:
Pipelines.Sockets.Unofficial
targetsnetstandard2.0;netcoreapp2.0;netcoreapp2.1;net46
and referencesSystem.IO.Pipelines
andSystem.Buffers
both Version4.5.0
. The project is signed.Pipelines.Sockets.Unofficial.Tests
referencesPipelines.Sockets.Unofficial
and targetsnet46;netcoreapp2.0
Benchmarks
referencesPipelines.Sockets.Unofficial.Tests
and targetsnet46;netcoreapp2.1
Repro
referencesBenchmarks
and targetsnet46;netcoreapp2.1
I have tried to produce simpler repro case, but I have failed. It works fine for .NET Core 2.1
IMHO VS/dotnet cli for some reason fails to generate the assembly binding redirects for
System.Buffers
for .NET 4.6.I have provided a workaround mgravell/Pipelines.Sockets.Unofficial#4
I don't know which repository is the best to report this bug, I decided to report it where
System.Buffers
belong.The text was updated successfully, but these errors were encountered: