enricosoft
Posts: 5
Joined: Sat Aug 11, 2012 11:21 am
Contact: Website

.NET framework info

Sat Aug 11, 2012 11:44 am

Hi,
i'm new on Raspberry and surfing the web i found a lot of information/tips but i wanna know from raspberry' s users if is the truth...

1) .NET with mono framework runs better on Arch Linux instead of Raspbian and in Arch you can run the latest version of mono without problem (in raspbian you can't run the latest)

2) On Raspbian you can run .net 3.5 max applications, instead on Arch linux you can run 4.5 apps

3) Arch linux is a very basic linux o.s. and if you want something you must install by yourself (you can install graphical interface and it's very personalizzable!). Raspbian is for beginner and it's already all installed.... (so it's requires more memory than Arch Linux)

4) I read that .net framework get a lot of memory to work and on Raspbian is a problem, but not on Arch linux.

5) If i write c# client app (with GUI) and compile the source with mono to ARM, it will works well

Is it all true? :)
If you want you can comment step by step... i'll apreciate! :)

Thanks a lot!
http://enricopiccini.com

amigarulez
Posts: 42
Joined: Wed Jul 18, 2012 10:16 am

Re: .NET framework info

Mon Aug 13, 2012 10:15 am

1) Yes

2) Old Raspbian works just as well as Arch, issue is with Mono and ArmV5 hard float compiled operating system. So basically mono currently is a no-go on Raspbian. A bug report has been filed to Debian, don't know the current state.
I now use mono-2.11.3 (compiling 2.11.4 now:)), most Linux distributions supply 2.10 branch which is the latest stable and support roughly up to .Net 4.0. The 2.11 branch is in development(although been very stable for me) and will be 2.12 when stable. It supports much of 4.5 and almost all of C#5.

Mono isn't exactly on par with .Net, some things are lacking like WPF i.e. and mono has a lot if things not present in .Net
But also Mono now includes some official .Net parts as they been open sources, Entity Framework i.e. is now included.

3) Yes, and that's why I use it :)

4) Don't understand the question in full here, but as mono is broken on Raspbian it's hard to compare.

5) If you use on of the supported GUI technologies then yes, WPF isn't supported.

enricosoft
Posts: 5
Joined: Sat Aug 11, 2012 11:21 am
Contact: Website

Re: .NET framework info

Mon Aug 13, 2012 10:48 am

Ok, thanks a lot for the answer! Now i know the correct way to chose! :)
http://enricopiccini.com

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: .NET framework info

Mon Aug 13, 2012 10:28 pm

Mono and .net both have relatively high memory requirements compared to native code (ie C or C++).

A program compiled to mono will run on ANY mono system, whether thats an x86 desktop PC running windows, an intel mac, a powerPC mac, linux on a MIPS processor etc etc.

Mono is broken on rasbian although should be fixed soon. Works on several other distro's though.

Monodevelop is almost unusable on the pi (pi is too slow for it to run). You could however use monodevelop on your main PC to write your application and compile it, then copy it to a memory stick to transfer it to the pi, it will run. Even better than monodevelop is Visual Studio, although its for .net originally with some tinkering it CAN use the mono compiler instead.

enricosoft
Posts: 5
Joined: Sat Aug 11, 2012 11:21 am
Contact: Website

Re: .NET framework info

Tue Aug 14, 2012 6:50 am

Ok, thanks! Yes, i'm using visual studio in my main pc and then i'll compile the source with mino in arch linux...

I hope the program will run fast in pi...

The only limitation of mono is wpf, right?
http://enricopiccini.com

amigarulez
Posts: 42
Joined: Wed Jul 18, 2012 10:16 am

Re: .NET framework info

Tue Aug 14, 2012 7:12 am

Well there are more limitations, if you run into them I don't know:)

As I wrote earlier it's not a 100% aligned with .Net, in some areas it lacks features and in others it has more features. For the moment iOS and Android (and Asp.Net in some extent) are the main drivers of Mono. Which basically means that C# and non GUI features are on par, but Linux desktop isn't as rapidly developed. It's OSS so nothing stopping people stepping in and filling the gaps. Perhaps the RPi can be a catalyst here.

If you don't have an existing app, then it's just about testing often and work around any limitations.

Also .Net/Mono assemblies/executables can be compiled with Visual studio and then executed without recompilation on the Mono runtime i.e.:

Code: Select all

mono HelloWorld.exe
But for debugging reasons and to find unsupported features it can be a good idea to build project on Mono.
Mono includes xbuild which can build your existing Visual Studio projects/solutons i.e.:

Code: Select all

xbuild HelloWorld.csproj

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: .NET framework info

Tue Aug 14, 2012 9:53 pm

Also Visual studio can be set-up to compile using mono instead of .net anyway.

Mono on the pi won't be lightning quick but you shouldn't hit any issues.

Other restrictions are lack of P/Invoke support. Not normally used by the application programmers but the windows forms library uses it alot so mono have had to try and write their own copy of it that does work on mono, its a little buggy. Instead they recommend using GTK# for GUI's. ASP.net has other dependencies so although it can be used with mono ASP.net itself needs to be on a windows machine (there is a clone of ASP.net specifically for mono though) and silverlight once again is usable with mono but isn't actually available on mono. XNA, works but XNA requires directx which isn't installable on mac or linux so you might aswell use .net anyway, monogame aims to recreate XNA using OpenGL instead of DirectX but at the moment doesn't work on the pi (quite a few people are trying to fix this though)

So mono can usually use all .net features IF your running on windows, but some things they've had to write themselves to get working on other platforms and may be buggier. Its still more than usable on the pi though.

Return to “Other programming languages”