Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is it possible to package a .NET application as a .DEB package and include MONO runtime so the software can be installed automatically and run on UBUNTU?

share|improve this question
You don't need to include Mono runtime in you package, you need to specify mono-runtime package as a dependency of your package. Otherwise there's no difference in packaging a .Net application from any other. – Sergey Nov 9 '12 at 20:33

Yes, it is possible to package a .NET application as a deb package, and you can tell it that it depends on mono so that it will be installed if not already present.

The best way to do this is to use xbuild to build your mono application. Here is the lines from my debian rules file, for my mono application widemargin

#!/usr/bin/make -f

include /usr/share/cli-common/cli.make

    xbuild $(CURDIR)/WideMargin.sln /p:Configuration=Release

Then put the following line in your control file:

Depends: ${cli:Depends}, ${misc:Depends}

This will automaticaly calculate your dependencies (including mono) and specify them for you.

The result is that when you install your Deb mono will be installed if it is not already present.

If you need further help with debian packaging of mono applications then the best place to get it is on #debian-cli on IRC OFTC server. These are the people responsible for mono packaging in debian and are really friendly and helpful.

share|improve this answer
is there a step by step guide on how to do this for newbies? – EgyptLovesUbuntu Nov 18 '12 at 9:01
not that I could find. – trampster Nov 25 '12 at 6:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.