I start using Ubuntu 9.04 on my laptop. What I really want is to be able to write my C# projects on Ubuntu, including unit testing. Could anyone guide me how to setup it?
In addition to the basic packages Matthew suggested, you'll also want the monodevelop-nunit package, which allows you to run and debug unit tests from within the IDE. For the debugger, you'll want monodevelop-debugger-mdb. You probably also want monodevelop-versioncontrol for SVN support, mono-xsp2 for running ASP.NET apps, and monodoc-browser for the docs viewer.
Maybe you're best off just installing all of the packages 'suggested' by the MonoDevelop package -- I believe the Ubuntu package manager has a way to do this easily from its GUI.
Beware that Ubuntu splits up Mono into many, many small packages, so if something's missing, use the apt-file tool or similar to find which package you need to install.
Ubuntu doesn't have Mono 2.4 packages yet; if you require 100% up-to-date packages, your best bet is to use openSUSE. The only way to get 2.4 on Ubuntu right now is to build from source -- and if you decide to do that, please read How not to break Mono installations first.
You probably already updated to 10.04 in the meanwhile. For 10.04 (and 8.04) you can use the badgerports. I didn't try it (yet), but it looks reliable.
I would suggest using 2.4 as it has all the latest .net goodness.
There are two guides I would suggest using:
http://blog.ruski.co.za/page/Install-Mono-on-Ubuntu.aspx
http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/
The latter lets you keep the mono install that comes with ubuntu so you can still install apps from synaptic. I would suggest using this. Both guides however are really clear about what is required to install it. It looks menacing at first but if you take a couple of hours to follow it then you will see it is actually quite easy.
Good luck
EDIT: Added mono-devel
I use Ubuntu 8.04, but what do you really need to setup? Doing (if you haven't already):
sudo apt-get install monodevelop nunit mono-devel
should give you what you need. And there are plenty of tutorials for both monodevelop (e.g. http://monodevelop.com/Documentation/Creating_A_Simple_Solution) and NUnit (e.g. http://www.nunit.org/index.php?p=quickStart&r=2.4.8)
Related
I'm using Visual Studio Code on Mac OS X to develop .NET Core web APIs. I already understand that adding NuGet references is done manually in the project.json file.
However, I'm not quite sure how to search NuGet for .NET Core specific libraries. The Mac OS X tutorial in the .NET Core documentation only instructs the developer to add project dependencies, and it doesn't go into detail about how the developer would know / discover the dependency names.
Is there a way to search NuGet specifically for .NET Core libraries, and/or libraries that are compatible with .NET Standard? I would like to use the Mac OS X terminal or even VSCode to do this. However, any solution would be a great starting point.
ps. I did come across Reverse Package Search, but I have no idea who created it, how up-to-date it is, and if it will be available six months from now.
Right now (as of January 2017), there's no easy way to search unfortunately. It's an open issue on the NuGet Github project.
The closest you can get right now is to look at the package dependencies after you find it (see my answer here). That doesn't help you find it in the first place, though. It's currently a manual "educated guess" process.
According to the official website, Mono now supports System.Speech (in 5.0) . However, I am unable to reach a linux build of version 5.0
"Packages for MonoDevelop 5.0.0.878 not yet available. The latest available version is MonoDevelop 4.2.1"
Is there any way of achieving this? (tarballs, git?)
Notes
I am using ArchLinux
The best way to use the last monodevelop on Linux is to get it from git (it's very fast and very easy :)
Now I'm using it (5.1) on Ubuntu 14.04.
You can get the source code from here:
git clone git://github.com/mono/monodevelop.git
and then compile it: http://monodevelop.com/developers/building_monodevelop
Remember that you must have installed Mono runtime 3.x.
I am answering this a little earlier but i think it applies right now too because Xamarin have already provided Mono 3.6.0 builds(technical preview) for Debian and derivatives.And with in a few months the best way to get anything latest related to mono will be from Xamarin official builds.They will provide Mono and some important applications including Monodevelop for every Debian and Centos derived Linux distributions.
See this link......
mono builds for many Linux distributions
Having just built Monodevelop the hard way, I would recommend downloading a tarball from http://download.mono-project.com/sources/monodevelop/ as everything is already included and requires no additional downloads except the some apt-get installs.
If you really want to use the git repo here is how to fix the two major issues I had.
1) I'm behind a proxy so I had to edit git module files to not use the git protocol as described in this post https://stackoverflow.com/a/11410074/1516326
2) You have to Import the Mozilla LXR certificates for Mono, so NuGet can update correctly, using:
mozroots --import --sync
For the entire process follow these instructions: http://www.monodevelop.com/developers/building-monodevelop/
I am working on a Mono GTK# desktop app written in C#. I have developed my app using the MonoDevelop IDE (v2.4.2) on a Mac (OS X v10.6.7). My app depends on the GTK# library (obviously) as well as the Mono.WebServer2 library for running a local ASP.NET server.
I have tested my app on my own Mac as well as other Macs. Everything is working out great. Now, I am interested in porting my app to other platforms (specifically, Windows 7 and Ubuntu v11.04). I have been playing around with the mkbundle command but I haven't had any luck in creating a working bundle for other platforms than Mac OS X.
Since I have tried a number of different solutions without success, I would like to hear from the Mono developers out there. What do you do to port your app to other platforms?
I have been developing C# using Visual Studio for a long time but I am new to the Mono development environment. Therefore, I would very much appreciate a detailed explanation.
Thank you very much!
It doesn't really sound like you're talking about porting, rather packaging. MonoDevelop's "Project/Create Package" function can create simple binary packages (zips etc) or source packages (source plus makefiles) but these are not the ideal form to distribute to most end-users. Some additional work is required to make a polished installer for each platform.
mkbundle bundles the Mono runtime into your app, therefore it creates binaries that are 100% platform-specific.
For Mac, the usual way to distribute an app is as an app bundle. MonoDevelop doesn't automate this for GTK# projects, but I explained how to do it on my blog.
For Ubuntu, you can distribute a zip of binaries and require that your users install Mono, GTK# and xsp. If you create a .deb package, you can embed these dependencies into the package manifest. MonoDevelop doesn't have any tools for creating deb/rpm linux packages, and I'm not familiar with the process myself.
For Windows, you can provide a zip of binaries and require that your users install .NET and GTK# for .NET. You could also create a msi installer and have it check for these prerequisites.
It sounds like you have already solved the problem of packaging for Mac.
On Ubuntu, you would want to create a .deb package that contains your app and requires other packages as dependencies (Mono, Mono.WebServer2, GTK#, GTK+, etc). The following link should get you started on building Ubuntu packages:
https://wiki.ubuntu.com/UbuntuDevelopment
For Windows, you probably already know how to build an installer if you have .NET experience. I would say that you would want to run your app on top of .NET instead of Mono. That is what the Mono team do themselves (for MonoDevelop as an example). Bring in the Mono specific bits like Mono.WebServer2 as part of your application.
Your biggest issue here will be that GTK# requires the GTK+ C libraries to be installed. Probably the easiest thing is to detect if GTK# is installed as part of the installer and ask your users to install GTK# if they need it. You are going to have to do the same detection for the .NET version you require anyway. You can get GTK# for Windows here.
I do not have great instructions for doing this but both the Banshee and MonoDevelop projects do it well. I would take a look at those projects as they will show you exactly what needs to be done.
https://github.com/mono/monodevelop
http://git.gnome.org/browse/banshee
EDIT:
I just recently realized that the code for the GTK# installer is on GitHub here.
There are is also packaging projects available in Monodevelop. you can use them.
I'm doubtful that mkbundle work well other than Linux.
Another option that open your project on other plateform (you can use Monodevelop) and build the project and use some other app to build package.
I just recently created deb package of my own .Net project written in MonoDevelop. From MonoDevelop I created a package with sources and makefiles (makefiles also generated by MonoDevelop) and then i used this guide>
http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html
to create deb package. Dependencies were mono-runtime and gtk-sharp2.
I'm currently dealing with multiple small-time dev projects at work.
I'd like to formalize the proecss and so i've installed TeamCity which was recommended by many and is also free for small projects.
I'd like to know -- which components are needed to build projects on a build agent machine ?
I'm building C# projects; do i need to install VS2010 on every build machine? only some subset of it? what exactly ?
Only the .Net framework ( which includes msbuild ) should be enough. No need, and it is probably not a good idea in most cases, to install Visual Studio on build agents. Keep the installed stuff on build agent to bare minimum needed to build.
Installing .NET and the Windows SDK (the .NET parts) should be sufficient. Depending on the project types you are using, it will be necessary to copy build targets from your local machine to the build agents (but this is a one time configuration).
You just need to install the framework 4.0 you don't need the all VS2010.
Maybe it's a web project and you use the Web Deployment Pakage so you will need to install this package: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=89f2c4f5-5d3a-49b6-bcad-f776c6edfa63&displaylang=en
Hope this helps.
I wanted to try WebKit by following this tutorial, but gmcs compiler was't able to find "webkit-sharp-1.0" package. Where can i get it and how to install it?
The original Webkit# no longer seems under development (latest commit is from 2009) and I have never encountered any windows packages for it but you can use open-webkit-sharp which is working on Windows.