Thursday, April 2, 2015

Install Mono/MonoDevelop on Raspberry Pi/Raspbian

MonoDevelop run on Raspberry Pi 2/Raspbian


Mono, sponsored by Xamarin, is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.

MonoDevelop enables developers to quickly write desktop and web applications on Linux, Windows and Mac OS X.


Always run this commands to update your apt before installation:
$ sudo apt-get update
$ sudo apt-get upgrade

To install Mono/MonoDevelop on Raspberry Pi running Raspbian:
$ sudo apt-get install mono-complete
$ sudo apt-get install monodevelop

This video show how to install on Raspberry Pi 2 running Raspbian version 2015-02-16.


The current installed version is mono-complete 3.2.8 and monodevelop 3.0.3.2.


Once installed, run it with Menu > Programming > MonoDevelop




THis video show a "Hello World" of C# console program build using MonoDevelop running on Raspberry Pi 2:


Next:
- Create Gtk# application using C#/MonoDevelop on Raspberry Pi 2

Related:
- Solve MonoDevelop error: cannot execute "...". File name hase not been set.


Updated: Install latest version of Mono and MonoDevelop on Raspberry Pi/Raspbian

1 comment:

Itai said...

Hi, i was going through the process but some errors occurred, please assist :

pi@raspberrypi:~ $ sudo apt-get install mono-runtime
Reading package lists... Done
Building dependency tree
Reading state information... Done
mono-runtime is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libmono-cil-dev : Depends: libmono-system-windows-forms-datavisualization4.0a-cil (= 3.2.8+dfsg-10) but it is not going to be installed
Depends: libmono-winforms2.0-cil (= 3.2.8+dfsg-10) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
pi@raspberrypi:~ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libmono-system-windows-forms-datavisualization4.0a-cil libmono-winforms2.0-cil
Suggested packages:
libgnomeui-0
The following NEW packages will be installed:
libmono-system-windows-forms-datavisualization4.0a-cil libmono-winforms2.0-cil
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/976 kB of archives.
After this operation, 3,764 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 128884 files and directories currently installed.)
Preparing to unpack .../libmono-system-windows-forms-datavisualization4.0a-cil_3.2.8+dfsg-10_all.deb ...
Unpacking libmono-system-windows-forms-datavisualization4.0a-cil (3.2.8+dfsg-10) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libmono-system-windows-forms-datavisualization4.0a-cil_3.2.8+dfsg-10_all.deb (--unpack):
cannot copy extracted data for './usr/lib/mono/gac/System.Windows.Forms.DataVisualization/4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll' to '/usr/lib/mono/gac/System.Windows.Forms.DataVisualization/4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll.dpkg-new': unexpected end of file or stream
Preparing to unpack .../libmono-winforms2.0-cil_3.2.8+dfsg-10_all.deb ...
Unpacking libmono-winforms2.0-cil (3.2.8+dfsg-10) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libmono-winforms2.0-cil_3.2.8+dfsg-10_all.deb (--unpack):
cannot copy extracted data for './usr/lib/mono/gac/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll' to '/usr/lib/mono/gac/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/libmono-system-windows-forms-datavisualization4.0a-cil_3.2.8+dfsg-10_all.deb
/var/cache/apt/archives/libmono-winforms2.0-cil_3.2.8+dfsg-10_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)