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?

  • 1
    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.

  • is there a step by step guide on how to do this for newbies? – Ahmed Osama Ibrahim Nov 18 '12 at 9:01
  • not that I could find. – trampster Nov 25 '12 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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