| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| comfilepi:dotnet_core_development [2026/06/08 04:20] – [.NET Development] mfranklin | comfilepi:dotnet_core_development [2026/06/10 02:02] (current) – [.NET Development] mfranklin |
|---|
| ====== .NET Development ====== | ====== .NET Development ====== |
| |
| .NET 5 and later brings a professional .NET runtime to Linux-based PCs like the [[index|ComfilePi]]. UIs can be created using the following UI frameworks and libraries: | .NET 5 and later brings a professional .NET runtime to Linux-based PCs like the [[index|ComfilePi]]. |
| |
| * [[winforms:index|ComfileTech.Winforms]] - A port of the Mono Winforms implementation to .NET 10 | Graphical User Interfaces and HMIs can now be created for Linux using the latest version of Visual Studio, .NET and C#. See the following GUI frameworks. |
| * [[https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor|Blazor]] - Create both remote and local UIs using web technologies. | |
| * [[https://avaloniaui.net/|Avalonia]] - XAML cross-platform UI framework built on .NET | |
| |
| The [[https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor|Blazor and Web Assembly]] technologies can be used to build GUI applications for the ComfilePi's modern web browser. | ^ Framework ^ Description ^ |
| | | [[winforms:index|ComfileTech.Winforms]] | A port of the Mono Winforms implementation to .NET 10 | |
| | | [[https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor|Blazor]] | Create both remote and local UIs using web technologies. [[.:dotnet_core_development:blazor_demo:index|Demonstration]]. | |
| | | [[https://avaloniaui.net/|Avalonia]] | Mature, open-source, XAML/C# cross-platform .NET UI framework with strong Linux desktop support | |
| | | [[https://platform.uno/|Uno Platform]] | XAML/C# cross-platform .NET UI framework using WinUI-style APIs; supports Linux desktop and embedded Linux targets. | |
| | | [[https://gircore.github.io/|Gir.Core]] | C# bindings for GObject-based libraries such as GTK; good for native GTK 4 / GNOME-style Linux apps with .NET. | |
| | | [[https://github.com/aprillz/MewUI|MewUI]] | Newer lightweight, code-first .NET GUI framework aimed at NativeAOT and small-footprint desktop utilities. | |
| |
| Blazor allows both client and server to be programmed almost entirely in C#. The [[https://docs.microsoft.com/en-us/dotnet/api/system.device.gpio|System.Devices.Gpio]] namespace provides just about everything one would need to do IO on the ComfilePi. Blazor also includes support for real-time web applications that can be viewed and interacted with from multiple local or remote clients. | |
| |
| The following video demonstrates a project running on the ComfilePi, controlling a [[:cpio:cp-io22-a4-2:index|CP-IO22-A4-2]] IO board (mounted on the rear of the ComfilePi). The application, running on the ComfilePi to the right can be viewed and interacted with from the ComfilePi itself, a development PC, or even a smartphone, in real-time. | |
| |
| {{ :comfilepi:dotnet_core_blazor.mp4?720x405 }} | |
| |
| <html><center>A .NET real-time web application running on the ComfilePi</center></html> | |
| |
| [[https://github.com/COMFILE-Technology/ComfileTech.ComfilePi.CP_IO22_A4_2.Demo|Download the source Code]] for the application demonstrated in the video above. | |
| |
| See also the [[https://learn.microsoft.com/en-us/dotnet/api/?view=iot-dotnet-latest|.NET IoT Libraries API Reference]]. | |
| |
| ===== Install the .NET SDK on the ComfilePi ===== | ===== Install the .NET SDK on the ComfilePi ===== |
| |
| |
| ====== Publishing, Deploying, and Running a .NET Application ====== | ===== Publishing, Deploying, and Running a .NET Application ===== |
| |
| To get a .NET application from your development environment to a ComfilePi, you need to perform the following steps in order: | To get a .NET application from your development environment to a ComfilePi, you need to perform the following steps in order: |