Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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

override_dh_auto_build:
    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

 
discard

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.