Using the Photino Launcher with OpenSilver
Starting from version 3.2, OpenSilver supports building cross-platform applications with MAUI Hybrid, allowing deployment to:
- Windows
- macOS
- iOS
- Android
However, MAUI Hybrid does not support Linux. To bridge this gap, OpenSilver integrates support for the Photino Launcher (https://www.tryphotino.io/), enabling OpenSilver applications to run seamlessly on Linux, as well as Windows and macOS.
You now have the flexibility to build fully cross-platform OpenSilver applications:
- MAUI Hybrid: Windows, macOS, iOS, Android
- Photino: Linux, Windows, macOS
Getting Started
To utilize the Photino Launcher with OpenSilver, ensure you have one of these development environments:
- Visual Studio 2022 with the OpenSilver Extension
- Visual Studio Code with the OpenSilver Extension
- The .NET CLI with the OpenSilver.Templates installed
Creating an OpenSilver Application with Photino Support
You can create a new OpenSilver application with Photino support using the command line, Visual Studio 2022, or Visual Studio Code.
1. Using the Command Line
Open a terminal and execute:
dotnet new opensilverapp -o MyAppName --usePhotino
📌 Note: The Browser launcher is always included by default. The
--usePhotino
option adds a dedicatedMyAppName.Photino
project to your solution.
Open the generated solution in Visual Studio, Visual Studio Code, or any text editor.
2. Using Visual Studio 2022
- Ensure the OpenSilver Extension is installed from the Visual Studio Marketplace.
- Create a new OpenSilver Application project.
- In the wizard's Platform Selection section, select Linux (Photino).
- Complete the wizard. Your solution will include the browser launcher and a
MyAppName.Photino
project.
3. Using Visual Studio Code
- Install the OpenSilver Extension.
- Run the "Create OpenSilver Application" command.
- Select Linux (Photino) when prompted for platforms.
- The generated solution includes the
MyAppName.Photino
project.
Running an OpenSilver Photino Application on Linux
Option 1: Command Line
Navigate to the Photino project directory and run:
cd MyAppName.Photino
dotnet run
This command launches your OpenSilver application within a native Photino window.
Option 2: Visual Studio Code
- Ensure both OpenSilver and C# Extensions are installed.
- Open your project folder in VS Code.
- Navigate to
Program.cs
within theMyAppName.Photino
project. - Press F5 to initiate debugging.
- If prompted, set
MyAppName.Photino
as the startup project to auto-generatelaunch.json
. Press F5 again to run your application.
Publishing Your Photino Application
Publishing an OpenSilver application with Photino is straightforward and preconfigured.
Publishing for Linux
The MyAppName.Photino.csproj
file is already set up for publishing. Simply execute:
dotnet publish
The output will be a self-contained, Linux-ready application located in:
MyAppName.Photino/bin/Release/TARGET_FRAMEWORK/linux-x64/publish/
This folder contains an executable compatible with most popular Linux distributions.
Packaging
Although the published output can be used directly, it's recommended to package the application using a native package manager for your target Linux distribution (e.g., deb
for Debian/Ubuntu, rpm
for Fedora/RedHat).
Proper packaging simplifies installation, improves user experience, and integrates the application seamlessly with Linux systems.
For detailed guidance on packaging and publishing, refer to the official Photino guide:
📄 Photino Publish Guide
Summary
The Photino Launcher significantly expands OpenSilver’s capabilities by adding robust Linux support. Combined with MAUI Hybrid, OpenSilver applications can now run on Windows, macOS, iOS, Android, and Linux from a unified codebase.
- Use MAUI Hybrid for Windows, macOS, iOS, Android.
- Use Photino for Linux, macOS, and Windows.
For further information, visit: