TheLaw
Posts: 13
Joined: Sun Oct 16, 2011 7:27 pm

Re: .Net CLR?

Sun Oct 16, 2011 8:43 pm

I can see that microsoft apps and operating systems have been ruled out for running on the RPi, so I was just wondering if the dot net micro framework might operate on it.

I use c# .Net in windows -- I think it is a truly amazing platform, and improving, plus great for education. Perhaps one could use visual studio on a PC to write some code, then compile it on the pi using built in compiler of dot net.

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: .Net CLR?

Sun Oct 16, 2011 9:10 pm

I haven't personally tested any .Net apps on my board, but it's highly likely that the open source Mono CLR implementation runs just fine.

joukio
Posts: 10
Joined: Tue Aug 30, 2011 4:48 am

Re: .Net CLR?

Mon Oct 17, 2011 8:17 am

yes, mono is running on arm:
http://www.mono-project.com/Mono:ARM
Would love to give it a go......

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24930
Joined: Sat Jul 30, 2011 7:41 pm

Re: .Net CLR?

Mon Oct 17, 2011 8:34 am

I seem to remember that Mono didn't install from the Debian repos - a broken dependency or something. That's not to say it won't work, just that I couldn't install it.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

DrClix
Posts: 3
Joined: Tue May 22, 2012 12:47 pm

Re: .Net CLR?

Tue May 22, 2012 12:50 pm

Just a point but I don't think you will need to recompile on the Raspberry Pi. Just run the executable you compiled on your desktop with mono myexe.exe from the Raspberry Pi command line.

Once built (dependencies aside) it should work.

DrClix
Posts: 3
Joined: Tue May 22, 2012 12:47 pm

Re: .Net CLR?

Tue May 22, 2012 12:54 pm

I don't think you will need to recompile on the Raspberry Pi.

Just copy across your compiled executable from your desktop machine and run from ARM mono:

>mono myexe.exe

should work.

I will try it out and post success once my Rpi arrives.

jools
Posts: 24
Joined: Sun Feb 19, 2012 9:47 pm

Re: .Net CLR? Compiling in mono

Thu May 24, 2012 5:43 am

Can confirm that you don't need to recompile your own .net programs or indeed dependencies such as MySql.Data.dll when you migrate them from x86 to Raspi ARM. Provided you are bring across a .net .exe or .dll, these are written in the Common Language RunTime and will execute out of the box. (Something that has impressed me immensely) The Msql.Data.dll from MySql site just runs.

The only exception to this is if the .net dll contains native code - one of the sqlite dll's does in fact but the sqlite namespace is available ready compiled in mono, so not a problem.

DrClix
Posts: 3
Joined: Tue May 22, 2012 12:47 pm

Re: .Net CLR?

Thu May 24, 2012 9:54 am

Thanks Jools.

That's good news that everything is as expected. Lots of schools will have more desktop machines than Raspberry Pis (at least at first) and most of these will be running Windows. If schools can install the free Express C# compiler then kids can work on simple programs and compile them on the PC before having a turn with the Raspberry Pi with no need to recompile.

error404
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm

Re: .Net CLR?

Thu May 24, 2012 6:52 pm

Or they could use the free MonoDevelop IDE and Mono toolchain directly on the Pi, if they really wanted to use C# / .NET :P

jools
Posts: 24
Joined: Sun Feb 19, 2012 9:47 pm

Re: .Net CLR? and the Mono IDE

Thu May 24, 2012 7:39 pm

I am fortunate in having been able to procure a Pi on eBay and I realise not everyone is in that position.

Firstly it is important to relay that this is one clever product that is a real pleasure to use and especially boot up for the first time (I did so on my Kindle charger!)

You have to be aware of a couple of things however: internet browsing is slow and can 'lock up' because the ARM processor is rendering it all (as there is not as yet a patch to make the GPU do the work) AND compiling is slow: It took me over eight hours to compile the latest version of mono from source.

Simple 'Hello World' c# programs will take about 3-4 seconds to compile using the native C# compiler in Mono - rather longer than a PC.

You are entirely correct I think in identifying .net as a 'bridge' between the windows and the pi linux platforms and since .net and particularly mono is my interest I hope to contribute to this. The breat strength of .net in this area is that the .exe's and dll's are portable between platforms AND are compiled to native code.

Return to “General discussion”