Publishing Your Application
How you package your app depends on the OS you’re shipping to. With the template’s single project, build each one with -p:BuildPlatform=<platform> (see Quick Start).
Windows
Build your project with dotnet publish -c Release, or from your IDE. To build Windows apps on macOS or Linux, add <EnableWindowsTargeting>true</EnableWindowsTargeting> to your project.
Users usually install Windows apps with an MSIX or MSI installer. See Microsoft’s packaging guide to set one up.
macOS
A Mac build creates an .app bundle in your output folder, and release builds include the .NET runtime so users don’t need to install anything. To turn this off, set <MacBundleDotNet>False</MacBundleDotNet>.
To ship it, the app needs to be signed, notarized and packaged in a .dmg. Eto.Forms can do all of this as part of your build; see Mac Code Signing and Notarization.
Mac64 apps can be built on any OS, but signing and notarizing has to be done on a Mac. The macOS platform can only be built on a Mac.
Linux
Build your project with dotnet publish -c Release, or from your IDE. Keep these in mind:
- Dependencies: users need GTK 3, plus WebKitGTK if you use
WebView. These come with most desktop distros. They also need the .NET runtime, unless you publish self-contained with--self-contained. - Icons: GNOME-based distros (such as Ubuntu and Fedora) only show your app’s icon if you include a .desktop file.
- Executable bit: if you build on Windows, the executable bit is lost. Users will need to run
chmod +x MyAppbefore it will start.
To package your app with its dependencies: