I'm trying to use the HashLib library in a Windows 10 app, but it throws an unhandled exception (System.MethodAccessException
):
Attempt by method 'HashLib.Hash.TransformStream(System.IO.Stream, Int64)' to access method 'System.Collections.Concurrent.ConcurrentQueue`1..ctor()' failed.
with no further information. The exact line that throws the exception is in the HashLib's source file named Hash.cs at line 380:
System.Collections.Concurrent.ConcurrentQueue<byte[]> queue = new System.Collections.Concurrent.ConcurrentQueue<byte[]>();
I can't find any clue regarding this issue on MSDN. I just saw that it is supported even in a portable class library so I would think it should work in a normal Windows 10 app, too. The exact same code was successfully used and tested within a WPF application and a Windows 8.1 app without any problems.