User Tools

Site Tools

한국어

comfilepi:dotnet:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
comfilepi:dotnet:index [2026/06/09 17:50] – [.NET (C# & VB.NET)] admincomfilepi:dotnet:index [2026/06/09 18:02] (current) admin
Line 1: Line 1:
-====== .NET (C# & VB.NET) ======+====== .NET (C# & VB.Net) ======
  
-This page applies to COMFILE Technology's Linux platforms, including ComfilePi, Raspberry Pi, jPC, and other Linux-based devices.+The .NET ecosystem has bifurcated into two flavors:
  
-You can develop C# and VB.NET applications on Linux using Microsoft .NET.+  * **".NET Framework"** now refers to the .NET Framework as it was up until and including version 4. 
 +  * **".NET"** now refers to the .NET Framework version 5 and later (previously called ".NET Core"), currently at .NET 10.
  
-Windows WinForms applications can also run on Linux using either ComfileTech.WinForms or Mono.+WinForms applications can be run on Linux panel PCs like the ComfilePi using one of the following configurations:
  
-In most caseswe recommend using the latest version of .NET for new projects.+  - Using .NET Framework 4with the application running on the Mono runtime. 
 +  - Using .NET 5+ and a .NET port of Mono WinForms like our [[winforms:index|ComfileTech.WinForms]] library.
  
-{{ :comfilepi:dotnet:linuxdotnet.png?nolink |}}+In general, it is recommended to use the latest version of .NET unless you have a compelling reason not to.
  
-===== Which Option Should I Choose=====+===== When to Choose .NET 5+ =====
  
-^ Scenario ^ Recommended Option ^ +[[:comfilepi:dotnet_core_development|Using .NET on the ComfilePi]]
-| Starting a new project | .NET 5+ (Recommended) | +
-| Want to continue using WinForms with modern .NET | ComfileTech.WinForms | +
-| Porting an existing .NET Framework application to Linux | Mono |+
  
-===== Modern .NET (.NET 5+) =====+You might choose to use .NET under the following scenarios:
  
-Modern .NET is Microsoft's current development platform and is recommended for most new projects.+  * You are embarking on development of a new solution, and 
 +  * Your .NET developers are willing to adopt a cross-platform UI framework that supports Linux like the following: 
 +    * [[https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor|Blazor]] 
 +    * [[https://avaloniaui.net/|Avalonia]] 
 +    * [[https://platform.uno/|Uno Platform]] 
 +    * [[https://github.com/picoe/Eto|Eto.Forms]] 
 +    * [[https://github.com/gircore/gir.core|Gir.Core]] 
 +    * There are many others 
 +  * Or, you can use a .NET port of Mono WinForms like our [[winforms:index|ComfileTech.WinForms library]]. 
 +  * If you would prefer WinForms with a more modern appearance, consider our [[jcontrols:index|jControls library]].
  
-Benefits include:+One of the best ways to make your application portable across all platforms is to use [[https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor|Blazor]].
  
-* Active development and support from Microsoft +If you can isolate your UI into a single .NET assembly, you can not only display your UI remotely in a web browser, but you can also host your UI in a WebView on any platform using [[https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/|Blazor Hybrid]].
-* Latest C# language features +
-* Improved performance +
-* Long-term platform support +
-* Cross-platform compatibility+
  
-Supported platforms include:+For Blazor Hybrid applications on Linux, consider using the open-source [[https://github.com/JinShil/BlazorWebView|BlazorWebView]].
  
-* Windows +NOTE: [[https://dotnet.microsoft.com/en-us/apps/maui|Maui]] does not currently support Linux.
-Linux +
-* Android +
-* macOS +
-* iOS +
-* Web Browser+
  
-For user interface development, consider one of the following frameworks:+==== Advantages ====
  
-[[https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor|Blazor]] +  It is being actively maintained and developed by Microsoft
-[[https://avaloniaui.net/|Avalonia]] +  New features, tooling enhancements, and performance benefits are being released every year
-[[https://platform.uno/|Uno Platform]] +  Code targeting .NET can be natively compiled, providing performance benefits as well as protection against code disassembly
-[[https://github.com/picoe/Eto|Eto.Forms]] +  Code targeting .NET can be used to make libraries that can be consumed by other languages like C, Python, and many others
-[[https://github.com/gircore/gir.core|Gir.Core]]+  * .NET has the broadest platform support, **IF** you can decide on a cross-platform UI framework. .NET supports the following platforms: 
 +    * Windows 
 +    * Linux 
 +    * Android 
 +    * MacOS 
 +    * iOS 
 +    * Web Browser
  
-If you prefer to continue using WinForms, consider using [[winforms:index|ComfileTech.WinForms]].+==== Disadvantages ====
  
-If you would like a more modern WinForms-style appearanceconsider [[jcontrols:index|jControls]].+  * If using WinForms, it requires a [[winforms:index|.NET port of Mono WinForms]] to run on Linux. 
 +  * If using a cross-platform UI framework, it may not be possible to use a WYSIWYG UI designer like that provided by WinForms in Visual Studio. 
 +  * Requires a .NET port of Mono WinForms to run WinForms programs on Linux.
  
-For more information:+===== When to Choose .NET Framework 4 =====
  
-[[:comfilepi:dotnet_core_development:index|Using .NET on Linux Devices]]+[[:comfilepi:dotnet:dotnet4:index|Using .NET Framework on the ComfilePi]]
  
-===== ComfileTech.WinForms =====+You might choose to use .NET Framework 4 under the following scenarios:
  
-ComfileTech.WinForms allows traditional WinForms applications to run on both Windows and Linux while using modern .NET.+  * You have an existing .NET Framework 2.0 ~ 4.x application that you need to port to Linux
 +  * Your .NET developers are not familiar with any cross-platform UI frameworks (e.g. [[https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor|Blazor]], [[https://avaloniaui.net/|Avalonia]], [[https://platform.uno/|Uno Platform]], etc.), and are only familiar with WinForms.
  
-This is often the easiest migration path for developers who are already familiar with WinForms and want to continue using the Visual Studio designer.+==== Advantages ====
  
-For more information:+  * Works on both Windows (natively) and Linux (via Mono). 
 +  * For developers already familiar with WinForms, it does not require learning a new UI framework.
  
-* [[winforms:index|ComfileTech.WinForms]]+==== Disadvantages ====
  
-===== .NET Framework 4 and Mono =====+  * Although .NET Framework 4 is being [[https://learn.microsoft.com/en-us/dotnet/framework/whats-new/|maintained by Microsoft]], and Mono is currently being maintained by the [[https://gitlab.winehq.org/mono/mono|Wine project developers]], they are not being further developed and will inevitably be deprecated in the future. 
 +  * The Mono implementation on Linux, while being a remarkable engineering achievement, is not perfect and may require some workarounds. 
 +  * Code targeting .NET Framework 4 can only be run on Windows and platforms with a functioning Mono runtime. 
 +  * Code targeting .NET Framework 4 cannot be compiled to machine code and can be easily disassembled.
  
-Mono allows existing .NET Framework applications to run on Linux.+===== Targeting Both .NET 5+ and .NET Framework 4 =====
  
-This option is useful when:+If you need to develop a library for use in both .NET Framework 4 and .NET 5+, use [[https://learn.microsoft.com/en-us/dotnet/standard/net-standard|.NET Standard]] 2.0.
  
-* You already have an existing .NET Framework 2.0–4.x application +Note that by targeting .NET Standard, you will likely be limited to creating utility libraries (e.g. Modbus communicationGPIOI2CSerial Communication, TCP/IP communication, etc.), but that can still be very helpful in maximizing your solution's portability.
-* You want to minimize code changes +
-* Your team is heavily invested in WinForms +
- +
-While Mono remains a practical solution for existing applications, it is generally not recommended for new projects. +
- +
-For more information: +
- +
-* [[:comfilepi:dotnet:dotnet4:index|Using .NET Framework and Mono]] +
- +
-===== Sharing Code Between .NET and .NET Framework ===== +
- +
-If you need a library that works with both .NET Framework 4.x and modern .NET, consider targeting [[https://learn.microsoft.com/en-us/dotnet/standard/net-standard|.NET Standard 2.0]]. +
- +
-This approach is particularly useful for reusable libraries such as: +
- +
-Modbus communication +
-GPIO access +
-I2C communication +
-Serial communication +
-TCP/IP communication +
-* Other utility libraries+
  
 ===== Technical Support Policy ===== ===== Technical Support Policy =====
  
-COMFILE Technology does not provide technical support for Visual Studio, C#, VB.NET, or Microsoft .NET technologies. +COMFILE Technology does not provide technical support for Visual Studio and .NET technologies.
- +
-For support related to Microsoft products, please contact Microsoft directly. +
  
 +Please contact Microsoft directly for support regarding their products and technologies.
  
 +[[comfilepi:index|ComfilePi - Industrial Raspberry Pi Panel PC]]
comfilepi/dotnet/index.1781027436.txt.gz · Last modified: by admin