Creating a Snap of a Mono app?

I am new to Linux desktop app development, but I have experience writing C# .NET apps for Windows, and Laravel web applications.

I’ve written a hello world, and I’ve an .exe.

How do I create a Snap package for it now?

Start from zero…

1 Like

Welcome, I am not that well versed in mono/.net so I have a few questions to get started:

  • How is the build driven?
  • If I were on a clean environment (fresh minimal install), what would I need to install to build this?

With this I can work on some guidance.

Thanks for the reply, @sergiusens!


You can cd into the root of the “Solution” (.NET jargon for group of related “projects”.), and execute “xbuild”.

xbuild

This would build all the projects in the current solution, and store the generated EXE files to each projects “bin/Debug” ({SolutionName}/{ProjectName}/bin/Debug) directory. The name of the EXE would be {ProjectName}.exe.

To generate a release build, you run xbuild with an additional parameter:

xbuild /p:Configuration=Release

This would export the built files to “Release” directories, instead of the “Debug”.


I created a fresh environment with LXC and built the solution. You’ll need following packages:

  • mono-xbuild
  • gnome-sharp2

You can then run the build process in this minimal environment.