question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type initializer for 'Crypto' threw an exception

See original GitHub issue

Steps to reproduce

brew upgrade brew install openssl brew link --force openssl dotnet new

Expected behavior

Should create a new dotnet app

Actual behavior

Environment data

dotnet --info output:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (5 by maintainers)

github_iconTop GitHub Comments

25reactions
SudhaOnlinecommented, Oct 18, 2016

execute ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

instead of ln -s /usr/local/Cellar/openssl/1.0.2h_1/lib/libcrypto.1.0.0.dylib /usr/local/lib ln -s /usr/local/Cellar/openssl/1.0.2h_1/lib/libssl.1.0.0.dylib /usr/local/lib

if you receive “File exists” message ln -sf will do the magic…

ln -sf /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -sf /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

13reactions
jcreamer898commented, Aug 12, 2016

Great news…

I saw some updated instructions on https://www.microsoft.com/net/core and with a bit of tweaking to where my precise home-brew dirs are located, things are now working…

echo $(brew --prefix)
# Use that path for ...
ln -s /path/to/homebrew/cellar/openssl/1.0.2h_1/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /path/to/homebrew/cellar/openssl/1.0.2h_1/lib/libssl.1.0.0.dylib /usr/local/lib/
Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet core in macOS: "The type initializer for 'Crypto' threw ...
I followed the instructions on the .NET Core website, but got this error. Apparently there are some pre-reqs which are missing. Any idea...
Read more >
TypeInitializationException Class (System)
The exception that is thrown as a wrapper around the exception thrown by the class initializer. This class cannot be inherited.
Read more >
Exchange 2016 , "The type initializer for 'Microsoft. ...
The type initializer for 'Microsoft.Exchange.ProvisioningAgent.AdminLogProvisioningHandler' threw an exception. I restarted, same issue.
Read more >
SOLVED the type initializer for module threw an exception ...
this error the type initializer for module threw an exception happened, when you installed upper version of .net framework. to solve this ...
Read more >
[Solved] The type initializer for '' threw an exception
TypeInitializationException". This error is raised due to Static constructor . Actually in my case i am accessing some value from the App.config ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found