Page 1 of 1

.NET 4.5 on Raspberry Pi- Mono

Posted: Mon Feb 29, 2016 2:13 pm
by adityaswami89
Hello,

I am developing an application using Azure IOT hub. I have compiled my application using .NET 4.5 and it works well. I then bring this application into Raspberry and try to run the exe. It throws me "missing method .ctor in assembly mono" for Microsoft.azure.device.dll .

Any help how i would be able to use this in Raspberry Pi

P.S : I have already installed mono complete

THanks,
Aditya

Re: .NET 4.5 on Raspberry Pi- Mono

Posted: Thu May 26, 2016 12:43 pm
by ErikHougaard
Did you manage to solve this problem? I am having a similar issue.

Best regards,

Erik

Re: .NET 4.5 on Raspberry Pi- Mono

Posted: Thu May 26, 2016 10:10 pm
by mthomason
According to https://azure.microsoft.com/en-us/docum ... gurations/ , It doesn't look like Azure IoT Hub is supposed to work with Mono on Raspbian. At a guess, the assembly Microsoft.azure.device.dll makes a direct API call to Windows that just doesn't work under Mono.

Strictly by the docs, you can write the device-side part of your code in C, Java, or JavaScript to run on Raspbian, or in .NET if you instead install Windows 10 IoT Core as your OS.

You *might* be able to get it to run under Mono somehow (it might just be a matter of copying some missing files over from a Windows install but it also just might not work, period), but it'd be an unsupported configuration. It appears there are also some Python bindings, but for whatever reason they're not listed as tested on Raspbian (as Python works on Debian, my guess is there's a good reason why they haven't gotten it working Raspbian rather than they just haven't tested it, as it feels like trying it and adding it to the list would be pretty easy if it just worked.)

Re: .NET 4.5 on Raspberry Pi- Mono

Posted: Wed Apr 05, 2017 8:28 am
by LondonGull
Was coming up against a similar problem on a different Debian system and came across the following post
http://blog.bennymichielsen.be/2016/03/ ... erry-pi-3/

where he notes you need

Code: Select all

sudo apt-get install  libmono-system-core4.0-cil
as well as mono-complete

Got rid of my missing .ctor error (just leaves my bugs ...)