22

I'm developing some cross platform software targeting Mono under Visual Studio and would like to be able to build the installers for Windows and Linux (Ubuntu specifically) with a single button click. I figure I could do it by calling cygwin from a post-build event, but I was hoping for at best a Visual Studio plugin or at worst a more Windows-native way of doing it. It seems like the package format is fairly simple and this must be a common need.

edit: Re-asked question under other account due to duplicate login issue.

5 Answers 5

6

Debian's .deb packages are just "ar" archives containing tarballs. You can manipulate both types of files using cygwin or msys quite easily:

$ ar xv asciidoc_8.2.1-2_all.deb 
x - debian-binary
x - control.tar.gz
x - data.tar.gz

$ tar -tzf control.tar.gz 
./
./conffiles
./md5sums
./control

Or you can install all the "standard" Debian stuff using cygwin, I suppose, but most of that stuff won't benefit you much if you're building a .Net app anyway.

5

If you use the .NET Core SDK, you can use dotnet-packaging tools to create a Debian installer package from any platform that runs .NET Core.

For example, running dotnet deb -c Release -f netcoreapp2.1 -r ubuntu.16.04-x64 would then create a .deb file which you can use to install your app on Ubuntu 16.04.

The project repository has more details.

3

I am not aware of any plugin that does it natively, especially since Mono users seem to prefer MonoDevelop.

However, it should be possible to use Cygwin and a custom MSBuild Task or Batch file in order to achieve that by using the native .deb creation tools.

2

this must be a common need.

Some small percentage of software developers develop for .NET
Some very small percentage of that group develop for mono
Some small percentage of that group wants to provide .debs instead of just a zip
Some very small percentage of that group wants to build their linux apps on windows instead of natively on linux

It's just you :-)

3
  • haha maybe..but I'm kinda surprised people really prefer MonoDevelop given it doesn't even have a debugger and there are free versions of Visual Studio available.
    – Luke
    Aug 13, 2008 at 20:40
  • I'ts also me!!!! I use VS 2017 + VSMonoDebugger 0.8.0 extension so I can build, deply and also debug. the only thing missing is edit-and-continue. And also a package maker. Jun 13, 2019 at 14:43
  • what do you mean "just a zip" ? is there a way to create everything (folder, config files, libraries, startup shortcut etc) ? Jun 13, 2019 at 14:44
0

If you don't mind using Java tools it's possible to build Debian packages with jdeb in an Ant script. That's probably lighter than relying on Cygwin.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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