3

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 09 '12 at 20:33

1 Answers1

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.

trampster
  • 11,342