You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Blazor webassembly] "The type initializer for 'Crypto' threw an exception" after upgrading to .net 5 preview 7 #39893
Hello guys, i see a similar issue when preview7 was released but im unable to find it, so i prefer open a new issue because its a blocking problem for me to upgrade.
The complete Exception
Unhandled exception rendering component: The type initializer for 'Crypto' threw an exception.
System.TypeInitializationException: The type initializer for 'Crypto' threw an exception.
---> System.DllNotFoundException: libSystem.Security.Cryptography.Native.OpenSsl assembly:<unknown assembly> type:<unknown type> member:(null)
at Interop.Crypto..cctor()
--- End of inner exception stack trace ---
at Internal.Cryptography.HashProviderDispenser.CreateHashProvider(String hashAlgorithmId)
at System.Security.Cryptography.SHA256Managed..ctor()
How to reproduce :
create a new blazor webassembly app .net 5 preview 7
put this line of code var lHasher = new System.Security.Cryptography.SHA256Managed();
This problem doesn't seem to be Blazor specific and more of an issue on the runtime on webassembly. We've moved it to the runtime repository since they'll be able to give you a faster and better answer.
Activity
javiercn commentedon Jul 24, 2020
@julienGrd thanks for reporting this issue.
This problem doesn't seem to be Blazor specific and more of an issue on the runtime on webassembly. We've moved it to the runtime repository since they'll be able to give you a faster and better answer.
campersau commentedon Jul 24, 2020
Looks similar to #39756
bartonjs commentedon Jul 24, 2020
Yep, duplicate of #39756