Anybody else using MonoDevelop? - c#

I'm starting a new project in MonoDevelop, and I want to see how other projects are using it.
I tried searching through SourceForge, code.google.com, etc., but mostly I was just finding things like add ins or something related to MonoDevelop itself.
So is there anyone else using MonoDevelop, especially open source?

Basically, MonoDevelop is designed to function very similar to Visual Studio, including using all the same sln/proj file types. You can take a VS solution, open it in MD, and hit F5 to run it, and vice versa.
Because of this, I don't know that many people are going to write about "how they use MD as part of their project" any more than someone is going to write about how they use Notepad.
Any project that is using sln/proj files on Linux/Mac is likely using MD.

MonoDevelop is multiplatform IDE, especially for Linux. Works with Visual Studio solution and project files (100% both direction compatibility). So you can't find project using it. Any C#/VB.NET project can be developed in MD.

Three years ago me and a friend started work a new mono project and tried to use MonoDevelop for it. However - this was an impossible mission - we got ridden with all kinds of bugs and crashes and in the end I said - go to hell MonoDevelop - I'll use my tried and true Emacs.
To tell you the truth with no features other than formatting and font locking Emacs turned out to be 10 times more productive environment for me. My friend somehow endured using MonoDevelop for the whole run of the project, but afterwards he said he was done with Linux for good if it offered such low quality dev tools.
Times were different back then, I've been following mono's development and monodevelop's as well - they seem to be turning out quite well. I think that the actual cause of your problem - not finding anything - lies in the fact that most Linux devs openly shun Mono as a development platform because of it's Microsoft roots. This is sad - because it's a solid alternative of Java - especially at the desktop applications front(GTK# is seriously cool).
Banshee seems to be using MonoDevelop. Probably most of the prominent mono projects with a GUI use it as well to some extent.

I've found MonoDevelop to be excellent so far. I've only been using it for about a month, but once I got it set-up the way I want it, I wouldn't go back to any other editor or IDE on Linux. It took me a while to figure out how to set the debugger up and configure the editor to how I like it.
It's almost like having Visual C# Express on Linux.

Try searching for MonoTouch projects. Mac + MonoDevelop + .NET iPhone apps.

I just tried compiling my project, 2 problems:
couldn't load Setup projects
couldn't load SQL Server Library projects
There is a way around this of course, just have to consider that not all project types can be built in mono and must design solution the way it doesn't stop you from building what you want.

Related

Importing winform solution to mono (linux) from VS Code (windows)

I tried to import a winform solution file from VS code (windows) to monodevelop (Linux) but it failed. The error is as follows:
Error while trying to load the project '/home/virtuall_kingg/Camera_GUI/Camera_GUI/Camera_GUI.csproj':
File not found: /home/virtuall_kingg/Camera_GUI/Camera_GUI/Camera_GUI.csproj
I added Camera_GUI.csprojfile also but still the error is same.
Can anybody guide me on how to import solution to mono?
This winform project has become pain in my neck.
Is building the GUI using gtk# in Ubuntu from scratch is the only way?
EDIT: Now you can substitute mono with .NET 5, the common .net framework for all platforms.
You are asking multiple questions here. In Linux you have (limited) support for WinForms through Mono. Depending on how complex is your project, you could port it without modification. If there are p/Invokes, then you won't for sure be able to port it.
Yep, in Linux the "other" big option is Gtk#, which has a long history. If you would want to port the project starting from scratch, it'd be a good option, but it'd involve porting your classes from working with WinForms to Gtk#, which is not impossible, but not trivial either. The feasibility of this would mainly depend on how good that project is architected. Do you have bussiness logic and views separated? If the answer is no, then the process will be tedious, and as hard as lengthy.
MonoDevelop is an IDE for C#, and Visual Studio for Mac is roughly MonoDevelop. It certainly works in Linux... as well as Visual Studio Code. So, there is no need to change anything in that front if you just need to port your code to Linux.
Okay, now, what's the road to follow? I think the best one is to try Mono with WinForms. It'd maybe involve simplify some code in the user interface part, but is certainly feasible. Just remember that you need to install Mono, and if your project is set to target .NET Core, then you need to create another project from scratch and set it to target .NET Framework.
Now, the specific question is that MonoDevelop complains about a missing Camera_GUI.csproj. This means that you've only picked a few files, but not the whole solution. Any IDE (Visual Studio, Visual Studio Code, Rider...), would complain about the same thing. Either remove the project from the solution, or add the project with all its files to the directory in which the solution sits.
So, the answer is: don't change anything if you don't need to retarget your project. Just move to a Linux box or virtual machine, with the whole project and open it in Visual Studio Code Rider, Rider, or MonoDevelop it does not matter. From within the IDE, remove those projects that make no sense in Linux (i.e., windows installer), and then recompile and start the program. Polish those parts of the user interface that need tweaking and that's it.
Should you need more help, please be more specific and provide more info.

C# using a library - compile from source? Really?

I'm not very experienced in C#, done some small stuff with it, but it's quite similar to Java, only different, so no fuss. For my current project I need a small web server. So I've been looking around and found that a lot of people are doing a HttpListener based thing. Great, I can do that, but I also ran into the Kayak web server (https://github.com/kayak/kayak) and I figured using a little more seasoned framework may be a good idea.
So I started to try and add it to my project; searching for a DLL to add. But it seems I'm suppose to check out the source and compile it using Rake. Really? Is that how frameworks in C# are distributing; 'old' style Unix "please compile me"? Expecting something like Maven may be too much, but... Or is this an exception?
Some open source projects need you to compile them from scratch - others provide NuGet packages. Often a project won't have a pre-packaged build until they reach v1.0, for example.
In the case of Kayak, there is a NuGet package, so that's probably what you should use.
Note that NuGet is only "reasonably" new (last couple of years) so there will be old, stable projects which haven't required any changes recently which may not have packages, and you may well find many developers who are going to use the project who aren't familiar with NuGet.
You are definitely looking for: http://nuget.org/packages/kayak
NuGet can be used from command line or as a Visual Studio addon - both work very well.

Developing with C# on OSX and Mono

I'm about to start a project that requires me to write c# code. The thing is, I've got a mac.
I was wondering if there are any pitfalls involved in c# development using mono on OSX 10.6
I think the page is clear that the implementation is crisp, but on the other hand I've read that people install VMWare or something like it to use Windows. I'd like to avoid that if possible.
Note
I'll be working on a team and all the
other guys have Windows machines
Thanks
Based on your comment to HiVoltRock's answer (ASP.NET development), I'd say Mono 2.10.1 and MonoDevelop will be just fine (the stable release of MonoDevelop works just fine, but for development on OS X I prefer to use the most recent version which I compile from Git).
There are some things to take into account, such as file paths (ie: if the windows devs are writing static paths such as ApplicationsInstallDirectory + "\data\templates\foo.bar"; you will run into problems as directory separators on Mac OS are forward slashes. Also if existing code is using P/Invoke or other specific Window's functionality you'll be in trouble.
Finally if your code base uses third party libraries that requires Windows this could cause you issues.
For reference our product has been designed since day one with a requirement that it runs on Mono on Linux or OS X. With that in mind we've made sure to consider everything with cross-platform execution in mind. If you're joining an existing product, the same considerations might not have been given, meaning a lot of the existing code isn't compatible with Mono.
The Mono Migration Analyser will help determine if you've got any incompatible code.
There is a bit of fud out there about developing under Mono. Our project is an MVC3 with Razor, running .NET 4 using NHibernate, StructureMap etc and there haven't been that many issues developing on a non-Windows machine.
Be aware that the .NET libraries from Microsoft and the implementations in Mono are compatible "most of the time." If you're working in a team, you may run into some headache related to these compatibility issues (also, if you're using any third party plugins to any .NET application you're writing, you may have issues as well.). If you didn't want to run a virtual machine, I'd just bootcamp into Windows. It might disrupt your flow if you're very used to the OSX UI, but if the rest of your team is using Windows, I'd do that just to avoid compatibility issues.
The biggest thing I've had developing on Mono (admittedly on Linux) was GUIs. The majority of GUI-less code will run just fine. The only thing I've had to do is catch a few different exceptions. GUIs, however, would be a whole different beast, so don't expect those to translate well at all.
I would highly recommend using windows thru vmware rather than trying to code with some unstable osx programs. It's not cool to code for hours on a mac and then realize that none of your code works on any windows machine or that the gui looks totally different than on your computer.Always choose the right tools and languages for the right problem. Besides, visual studio is pretty nice to work with most of the time.
I've come across odd cases of memory leaks and segfaults with code compiled on Windows and dropped onto a Mono Linbox as-is. I've also had issues compiling .csproj files with xbuild that had some MS quirk that xbuild wasn't familiar with.
If I'm not mistaken, the two compilers do slightly different things at times, which are related to subtle implementation differences in the runtimes. This is most likely the cause of the segfaults and memory leaks I've come across.
My bottom line is, compile on the same platform as the runtime. So for local testing, you should be fine (you compile on mono on your mac and run/test with mono on your mac). But don't build the project on your mac and then release the resulting Mono binaries to Windows servers running MS .NET runtime (or vice versa). If you have a build server best would be to stick to that (which we all should do anyway... right?).
If your team doesn't have a build process and you must build the binaries you are going to release, I would use a Windows VM for that final step.

Moving development from Windows to Linux

I'm a longtime Visual Studio(from versions 6 to 2008) user that really like the editor and especially the debugger. Now I'm thinking of giving Linux a go, is there a IDE with similar, or better, capabilities out there?
I'm also interested in recommendations for GUI libraries, c++ or c#.
http://monodevelop.com/ would be your closest bet for an editor similar to visual studio
I would recommend Eclipse, it's quite similar to Visual studio in capabilities and can be extended with much more plugins than VS has to offer.
I'd check out Mono. You shouldn't have to change too much from what you already do.
Dont, just dont! I'm doing this now # work since I have to and i tried, netbeans, kdevelop, eclipse. They're so basic compared to VS, especially if you're used to the more advanced features that you'll get crazy and desire visual studio back.
I moved from windows to linux 9 or so years ago after spending my initial career using Visual Studio.
The move was relatively easy as the build environment was first and foremost based on Makefiles. Up to this point I used scripts to create a visual studio project for the project each time there were changes.
At that time, the others in my team were using emacs. The learning curve is pretty steep when you come from something like VS, but IMHO it has been well worth the time I invested in it.
What sold me on emacs was the integration with gdb. Emacs has a mode specifically for gdb. Once this mode is started you can enable 'gdb-many-windows'. This gives you a view very similar to that of any debuger environment. Also, one of the first things that I did after moving was to setup the VS key shortcuts. So even after all this time, I have the following in my .emacs file:
(global-set-key [f7] 'compile) ;; asks for a command to run eg: make
(global-set-key [f4] 'next-error) ;; show the next error
(global-set-key [S-f4] 'previous-error) ;; show the previous error
(global-set-key [f5] 'gdb) ;; start the debugger
(add-hook 'gud-mode-hook ;; allows changes to debugger mode
'(lambda ()
(define-key (current-local-map)
[f10]
'gud-next) ;; F10 does step over
(define-key (current-local-map)
[f11]
'gud-step) ;; F11 does step into
(define-key (current-local-map)
[\S-f11]
'gud-finish) ;; Shift+F11 finish function
(define-key (current-local-map)
[f5]
'gud-cont) ;; F5 does continue.
(gdb-many-windows t))) ;; Set's up a debugger type view
If you haven't used emacs before, then the first thing you need to know is that you type: Ctrl+X Ctrl+C to exit emacs.
If you do decide to give it a go, after loading it up use Ctrl-H then 't'. This starts the emacs tutorial which will give you the basics.
Of course, if you get stuck, then just review or ask a SO question tagged with emacs. This has become a really could source of information for emacs use. I only found out about gdb-many-windows this April from this question!
Eclipse is the only IDE out there supporting multiple languages which has a comparable power to Visual Studio.
If you are going to do c# development on linux I would recommend MonoDevelop. It is designed specifically for .net development (eclipse is not) and it is really quite full featured now, it includes a visual debuggers, code completion, graphical nunit integration and virtually everything else you would expect from a modern IDE. It includes some features missing from Visual Studio. I was excited just recently to discover I can right click on an interface and choose find all implementations, This is a feature not implemented in visual studio and which I find extremely helpful.
Regarding the GUI libaries, if you are using c# on linux then the best GUI framework is GTK#. MonoDevelop includes a built in graphical designer for it.
Several mature and widely used linux applications use this including:
Banshee - music player
FSpot - photo manager (default in Ubuntu)
Tomboy - Notes application (default in gnome)
MonoDevelop - IDE (similar to Visual Studio)
GTK# is also cross platform and so can run on mac and windows as well. This is proved by its usage in MonoDevelop where it is used to run on linux, mac and windows.
I'm a Linux developer and I would kill (or at least maim) for a development environment approaching the sophistication of Visual Studio. But then Visual Studio doesn't support Lua or Haskell or ML, which are the major languages I use these days.
Like many others I find Eclipse too slow and lacking in functionality for languages that are not Java.
I do have two positive recommendations: for debugging C and C++ programs, the combination of valgrind (a memory debugger) and the Data Display Debugger (an interactive GUI debugger) make me about 5 times more productive in C than I used to be with just dbx or gdb.
Now I'm thinking of giving Linux a go,
is there a IDE with similar, or
better, capabilities out there?
I'm also interested in recommendations for GUI libraries, c++ or c#.
I only speak for C++:
There are similar IDEs, but they are not as good as VS.
The Qt framework includes the best C++ GUI library.
Do not even bother with Eclipse or MonoDevelop for C++, try KDevelop or QtCreator. The C++ debugging will be especially painful compared to what you've been used to.
monodevelop. Also #Develop is pretty nice - fast, though missing some features, and only supports C# (Mono or .NET)

How to get started with Mono in Linux for a beginner?

How do I start using Mono in Linux as a beginner when I want to switch from Visual Studio?
Is there some easy way to install it like Visual Studio and get started?
So far,with what I've seen,it looks complex to even get started.
Installing and configuring Mono in linux is a lot of work right?
or Is there some distro which I can directly install and get started with applications in Linux?
I recently started to dabble in Mono myself and have so far realized that the MonoProject has made huge advancements in this area. It's well worth it to investigate.
With that said, the easiest method is to get setup with a Linux distro that is Mono friendly such as Suse, or Ubuntu. Personally, I tried it using Ubuntu 8.10.
Once you've got your Linux distro setup properly download and install MonoDevelop. This is an open source IDE that's tightly integrated to work with the Mono platform. MonoDevelop was taken as a branch of SharpDevelop and designed to work with the Mono compiler from the ground up.
This is by far the easiest and fastest way to get setup with Mono. The MonoDevelop IDE is very similar to that of Visual C# Express even. It comes complete with Project/Solution management, GUI development using the GTK# framework, an integrated debugger and a host of other features you would expect in an IDE such as code-completion, line numbers, code-folding etc.
The folks at the MonoProject are on to something with this suite of tools.
Hope this helps you get started.
Mono Project Homepage
Mono Develop Homepage
There are a few interesting books on Mono, although they're probably a little bit old. Still, probably it's worth to grab one and take a look in order to start up.
Practical Mono
Mono: A developer's notebook
Cross-Platform .NET development
Mono Kick-start
Then, I'd install latest Mono (2.4) on a Linux box (OpenSuse is the one they use, so it will always go smoothly for development, but we also use Ubuntu internally) and start playing around with the compiler, MonoDevelop (which is quite good since 2.0) and so on.
The only tough point will be writing GUI applications, although my team make extensively use of MWF on different Unix flavors. But everything else will go as you'd expect. I'm specially happy with how great remoting works, for instance.
If you're used to Linux then it will be much easier, otherwise I'd also recommend you getting used to it following some tutorial.
Remember tools such us NUnit and NAnt will be also available, so you can start writing your code on both Windows and Linux and testing and compiling on both platforms.
With the just released Ubuntu 9.04 a very current Mono development environment is as close as:
apt-get install monodevelop
I used to agree with you that it was somewhat difficult to get going with Mono, but the latest version of Ubuntu has melted that barrier away. And the latest version of Monodevelop is an absolute joy to use.
Don't use Ubuntu? Then I would go with Peter's advice of using a VMWare image.
For a very easy start with mono under linux u can download
a vmware image
a linux live distro
with everything included to start.
If you are accustomed to using visual-studio, you can still develop in Visual Studio, and copy your binaries to Linux/OSX or whatever. Or even better, if you have a shared drive, just reconfigure your VS-Project output directory to the shared location.
There might be advantages to using the mono compiler, or monodevelop, but since you are getting started, the above is really the easiest thing to do. If you want to run on Linux, the mono installer is an excellent option for getting up and running in a hurry. Unfortunately, there's no installer available for the newest mono release, so you'll either need admin permission, or need to compile from source.
http://ftp.novell.com/pub/mono/archive/1.9.1/linux-installer/2/mono-1.9.1_2-installer.bin
For installing newest Mono 3.2.5+ with MonoDevelop 4.2.1+ it is better is use tpokorra repository.
The simplest way I could find is to download the OpenSUSE VMWare Image on their site and just run it. You get all the tools you need :) Preconfigured.
Debian and Ubuntu, and probably all other children, have mono in the repository. So, setting up mono in Linux can be as easy as
aptitude install monodevelop
However I would suggest version 2 which requires using the 'sid' repository in Debian (don't know about Ubuntu).
vim /etc/apt/sources.list [ :%s/squeeze/sid/g ]

Categories

Resources