LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-20-2006, 12:36 PM   #1
edwin11
Member
 
Registered: Dec 2005
Distribution: Linux Mint 13 MATE
Posts: 120

Rep: Reputation: 15
Development With Mono


Hi all,

i need to start using C# .NET for work pretty soon, and would like to start messing around with it first. i don't want to have to boot up to Windows in order to do this, so i'm thinking to mess around with Mono. Now, i have only HEARD about Mono, so i could do with some help/advice on how to get started.

What packages do i need to install? (i looked in the repository and there seems to be quite a number of Mono-related packages.)

Any IDE to recommend? (Well, if not IDE, at least an editor that does syntax-colouring and facilitates compilation, like what VIM is to C.)

Any other advice/recommendation?



TIA and Regards,
Edwin
 
Old 06-20-2006, 05:46 PM   #2
boredandblogging
Member
 
Registered: Jun 2006
Posts: 62

Rep: Reputation: 15
google is your friend (for the most part anyway):

http://www.mono-project.com/Downloads
http://www.monodevelop.com/Main_Page (the IDE)
http://www.gotmono.com/docs/ide/eclipse.html (if you want to use the Eclipse IDE)
 
Old 06-21-2006, 06:54 AM   #3
GL1800
Member
 
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175

Rep: Reputation: 30
Also, the beagle devs are just terrific with mono. IRC on gimp.net channy #dashboard. This is, of course, quite beagle-centric, but there's a lot to learn there.
The tomboy people have an IRC hangout, too, but I don't know that one.
 
Old 06-23-2006, 12:10 PM   #4
edwin11
Member
 
Registered: Dec 2005
Distribution: Linux Mint 13 MATE
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks guys!

i have checked out the links, and am now downloading Mono from mono-project. (the download seems to be crawling though...)

Still looking at which IDE to get. i have been using Eclipse, but i was working with Java previously. Quite like Eclipse and quite used to it as well, but don't mind trying new stuff either.



Thanks and Regards,
Edwin
 
Old 06-23-2006, 12:13 PM   #5
cupubboy
Member
 
Registered: May 2003
Location: Bucharest,Romania
Distribution: Fedora Core 7
Posts: 109

Rep: Reputation: 15
The mono project has a pretty good IDE ... it's in the downloads at their website
 
Old 06-23-2006, 01:33 PM   #6
edwin11
Member
 
Registered: Dec 2005
Distribution: Linux Mint 13 MATE
Posts: 120

Original Poster
Rep: Reputation: 15
Hi guys,

i have downloaded and installed mono-1.1.13.8, which comes with MonoDevelop 0.9.

Now, i needed a wrapper script, as i need to set the variable MOZILLA_FIVE_HOME. So i created a run_monodevelop.sh which is:

Code:
#!/bin/sh

MOZILLA_FIVE_HOME=/usr/bin
export MOZILLA_FIVE_HOME

/opt/mono-1.1.13.8/bin/monodevelop
Now if i run this script from the Gnome Terminal, MonoDevelop comes up fine (haven't tried doing anything else on it though.)

But if i try to launch the script from Nautilus, or from a menu item which points to the script, i get the following:

Code:
System.TypeInitializationException: An exception was thrown by the type initializer for Gnome.ModuleInfo ---> System.DllNotFoundException: gnomesharpglue-2
in (wrapper managed-to-native) Gnome.ModuleInfo:gnomesharp_gnome_moduleinfo_get_name_offset ()
in <0x00008> Gnome.ModuleInfo:.cctor ()--- End of inner exception stack trace ---

in <0x00000> <unknown method>
in <0x00025> Gnome.Modules:get_UI ()
in <0x00440> MonoDevelop.Ide.Gui.IdeStartup:Run (System.String[] args)
in <0x00169> MonoDevelop.Core.AddIns.AddInService:StartApplication (System.String addinId, System.String[] parameters)
Any advice please?



TIA and Regards,
Edwin
 
Old 06-23-2006, 04:14 PM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
MOZILLA_FIVE_HOME needs to point to where your mozilla libs are, like:

Code:
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-1.7.12
also, you need to make sure that you have gnome-sharp installed and mono knows where it is located since you're installing into /opt
 
Old 06-23-2006, 09:59 PM   #8
edwin11
Member
 
Registered: Dec 2005
Distribution: Linux Mint 13 MATE
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks __I,

your post gave me some inspiration! i looked at my environment variables on Gnome Terminal and found that if i wanted to run the IDE outside the terminal i needed to add a couple more variables:

Code:
#!/bin/sh

PATH="$PATH:/opt/mono-1.1.13.8/bin"
export PATH
LD_LIBRARY_PATH="/opt/mono-1.1.13.8/lib"
export LD_LIBRARY_PATH
MOZILLA_FIVE_HOME="/usr/bin"
export MOZILLA_FIVE_HOME

/opt/mono-1.1.13.8/bin/monodevelop


Thanks and Regards,
Edwin
 
Old 06-24-2006, 04:17 AM   #9
edwin11
Member
 
Registered: Dec 2005
Distribution: Linux Mint 13 MATE
Posts: 120

Original Poster
Rep: Reputation: 15
BTW, just out of curiousity...

What are the special features that Mono brought along and that were not present in C(++)? i'm not familiar with C(++) and am also new to Mono, so i'm just interested to know. What's the breakthrough about Mono? Could, e.g. Beagle have been written in C?



TIA and Regards,
Edwin
 
Old 06-24-2006, 05:50 AM   #10
cupubboy
Member
 
Registered: May 2003
Location: Bucharest,Romania
Distribution: Fedora Core 7
Posts: 109

Rep: Reputation: 15
Well Mono is in fact an opensource version of the Microsoft .NET platform .. actually an implementation of the development framework.

I assume you're actually refering to the c# language .. wich is a lot like java actually .. and also the big difference between it and c++ would be that it's managed code. C# code get's compiled to IL (intermediary language) code .. wich is then intepreted at run time by a VM .. to the best of my knowledge anyway
 
Old 06-24-2006, 06:42 PM   #11
liaty
Member
 
Registered: Oct 2005
Distribution: openSuse 10.1
Posts: 129

Rep: Reputation: 15
I've just started with mono. I've not done any previous programming.

If you are starting from scratch get a C# begginers guide from your library. The basic tutorials start off with console programs which are identical in Windows and on Linux. Once you move on to GUI programs however things branch off. Windows uses windows.forms, Linux uses GTK. GTK is available for Windows and future versions of mono I beleive will include more of the windows.forms compatible code. However the drawing of windows etc. is only a small piece of the coding. Any experiences you learn creating namespaces, classes, event handlers etc. Will be tranferable between mono and .NET.
If you are wanting to create your own Linux programs a book I would recomend would be Mono a developers notebook. But get a book on the basics first.
 
Old 06-25-2006, 04:34 AM   #12
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Rep: Reputation: 30
what happens with windows specific stuff like registry edits in C#? I always hoped that mono would allow me to port my windowos C# applications over to linux (and vica versa), but I can't see a way to achieve that now with all the windows platform-specific elements in the .Net framework.


christo
 
Old 06-25-2006, 11:11 AM   #13
boredandblogging
Member
 
Registered: Jun 2006
Posts: 62

Rep: Reputation: 15
Quote:
Originally Posted by chr15t0
what happens with windows specific stuff like registry edits in C#? I always hoped that mono would allow me to port my windowos C# applications over to linux (and vica versa), but I can't see a way to achieve that now with all the windows platform-specific elements in the .Net framework.
If you writing the application in windows first, avoid writing to the registry. From the mono FAQ (http://www.mono-project.com/FAQ:_Technical)
What about writing to the registry? As I understand it, Linux does not have a counterpart to the registry. Should I avoid relying on that feature?

Try to avoid it. Although there would be a emulation for registry in Mono too. GNOME does have a registry like mechanism for configuration. But Even if gnome has a configuration system similar to the registry, the keys will not be equal, so you will probably end up having to do some runtime detection, and depending on this load an assembly that has your platform-specific hacks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mono and 10.0 OE Latem Mandriva 2 06-08-2007 09:02 PM
Help Mono Installed But Mono Develop Won't Load TheGreatGonzo Slackware 8 05-18-2006 06:42 AM
LXer: Rapid GNOME Development with Mono LXer Syndicated Linux News 0 01-29-2006 08:46 AM
Bluetooth Application Development using Mono & VS.NET 2005 csshyamsundar Programming 0 12-15-2005 09:23 AM
need help [mono] emex Linux - General 1 11-30-2004 03:59 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration