Can't debug some applications in Visual Studio for Mac

2.4k views Asked by At

When creating a new console application (.Net core) in Visual Studio for Mac and I try to debug it, I get an error:

Debugger operation failed

Unable to start debugging. The type initializer for 'Crypto' threw an exception.

This happens after updating the application to the latest stable release of .Net core 1.1.0.

Any ideas why this might happen?

3

There are 3 answers

1
Set On

Try to do the following (found here ):

brew update
brew install openssl
brew link --force openssl

Update: I have faced with the same problem after updating mono via brew. And repeating last steps from Install pre-requisites section helps...

mkdir -p /usr/local/lib
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/
0
Eric Milliot-Martinez On

Check to make sure this location is set correctly: enter image description here

0
Mauro Piccotti On

I had this problem in September/October, with Rider everything always worked. I reported this bug on Xamarin bugzilla and immediately somebody contacted me and "we solved" (I let him working on my machine with TeamViewer).

enter image description here

The working version (7.4) is still not stable but it will be soon.

enter image description here