Had tried to launch SignalR client (.NET Framework 4.5 target) on my Pi 3 with Mono on Raspbian. But it's not working because SignalR's throws a System.InvalidProgramException - something wrong with Cryptography.X509Certificates.X509CertificateCollection constructor...

Unhandled Exception: System.AggregateException: ---> System.InvalidProgramException: Invalid IL code in System.Security.Cryptography.X509Certificates.X509CertificateCollection:.ctor (): method body is empty.

Is there anyone here who has an idea how to fix it?

  • Could you get your Mono version and edit that into your post? Thanks. – Aurora0001 Sep 10 '17 at 12:31

Yep, @Aurora0001 you're right, thanks!

So, I did only sudo apt-get install mono-complete which installed the Mono 3.2.8 instead the latest version.

I forgot add the Mono repository to my system:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian raspbianjessie main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update

And after that install the Mono:

sudo apt-get install mono-complete

And the Mono 5.2.0 was installed!


  • Note: This installed Version for me, on Raspbian Jessie – TheColonel26 Apr 26 '18 at 11:36
  • 1
    @TheColonel26 yep, cause in Sept '17 the latest version was 5.2.0. You can see latest stable version here mono-project.com/download – MihailPw Apr 27 '18 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.