This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| comfilepi:dotnet:index [2026/06/09 17:50] – [.NET (C# & VB.NET)] admin | comfilepi: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' | + | The .NET ecosystem has bifurcated into two flavors: |
| - | You can develop C# and VB.NET applications on Linux using Microsoft | + | * **" |
| + | * **" | ||
| - | Windows | + | WinForms applications can be run on Linux panel PCs like the ComfilePi |
| - | In most cases, we recommend using the latest version of .NET for new projects. | + | - Using .NET Framework 4, with the application running on the Mono runtime. |
| + | - Using .NET 5+ and a .NET port of Mono WinForms like our [[winforms: | ||
| - | {{ : | + | 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 |
| - | ^ Scenario ^ Recommended Option ^ | + | [[: |
| - | | Starting a new project | + | |
| - | | Want to continue using WinForms with modern .NET | ComfileTech.WinForms | | + | |
| - | | Porting an existing .NET Framework application to Linux | Mono | | + | |
| - | ===== Modern | + | You might choose to use .NET under the following scenarios: |
| - | Modern | + | * You are embarking on development of a new solution, and |
| + | * Your .NET developers are willing to adopt a cross-platform | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * There are many others | ||
| + | * Or, you can use a .NET port of Mono WinForms like our [[winforms: | ||
| + | * If you would prefer WinForms with a more modern appearance, consider our [[jcontrols: | ||
| - | Benefits include: | + | One of the best ways to make your application portable across all platforms is to use [[https:// |
| - | * 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 |
| - | * Latest C# language features | + | |
| - | * Improved performance | + | |
| - | * Long-term | + | |
| - | * Cross-platform compatibility | + | |
| - | Supported platforms include: | + | For Blazor Hybrid applications on Linux, consider using the open-source [[https:// |
| - | * Windows | + | NOTE: [[https:// |
| - | * Linux | + | |
| - | * Android | + | |
| - | * macOS | + | |
| - | * iOS | + | |
| - | * Web Browser | + | |
| - | For user interface development, | + | ==== Advantages ==== |
| - | * [[https:// | + | |
| - | * [[https:// | + | * New features, tooling enhancements, |
| - | * [[https:// | + | * Code targeting .NET can be natively compiled, providing performance benefits as well as protection against code disassembly. |
| - | * [[https:// | + | * Code targeting |
| - | * [[https:// | + | * .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: | + | ==== Disadvantages ==== |
| - | If you would like a more modern | + | * If using WinForms, |
| + | * 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 ===== |
| - | * [[: | + | [[: |
| - | ===== ComfileTech.WinForms ===== | + | You might choose to use .NET Framework 4 under the following scenarios: |
| - | ComfileTech.WinForms allows traditional WinForms applications | + | * You have an existing |
| + | * Your .NET developers are not familiar with any cross-platform UI frameworks (e.g. [[https:// | ||
| - | 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: | + | ==== Disadvantages ==== |
| - | ===== .NET Framework 4 and Mono ===== | + | * Although |
| + | * The Mono implementation on Linux, while being a remarkable engineering achievement, | ||
| + | * 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 | + | ===== 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:// |
| - | * 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 communication, GPIO, I2C, Serial |
| - | * You want to minimize code changes | + | |
| - | * Your team is heavily invested in WinForms | + | |
| - | + | ||
| - | While Mono remains a practical solution for existing applications, | + | |
| - | + | ||
| - | For more information: | + | |
| - | + | ||
| - | * [[: | + | |
| - | + | ||
| - | ===== Sharing Code Between .NET and .NET Framework ===== | + | |
| - | + | ||
| - | If you need a library | + | |
| - | + | ||
| - | This approach is particularly useful for reusable libraries such as: | + | |
| - | + | ||
| - | * Modbus communication | + | |
| - | * GPIO access | + | |
| - | * I2C communication | + | |
| - | * Serial | + | |
| - | * 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 | + | COMFILE Technology does not provide technical support for Visual Studio |
| - | + | ||
| - | For support related to Microsoft products, please contact Microsoft directly. | + | |
| + | Please contact Microsoft directly for support regarding their products and technologies. | ||
| + | [[comfilepi: | ||