This shows you the differences between two versions of the page.
| Previous revision | |||
| — | comfilepi:dotnet_core_development [2026/06/10 02:02] (current) – [.NET Development] mfranklin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== .NET Development ====== | ||
| + | |||
| + | .NET 5 and later brings a professional .NET runtime to Linux-based PCs like the [[index|ComfilePi]]. | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ^ Framework ^ Description ^ | ||
| + | | [[winforms: | ||
| + | | [[https:// | ||
| + | | [[https:// | ||
| + | | [[https:// | ||
| + | | [[https:// | ||
| + | | [[https:// | ||
| + | |||
| + | |||
| + | ===== Install the .NET SDK on the ComfilePi ===== | ||
| + | |||
| + | === Trixie === | ||
| + | |||
| + | == .NET 10 SDK == | ||
| + | |||
| + | The ComfilePi Trixie OS includes [[https:// | ||
| + | |||
| + | === Bookworm === | ||
| + | |||
| + | == .NET 10 SDK == | ||
| + | Starting with .NET 10, Microsoft is publishing ARM64 Linux packages. | ||
| + | |||
| + | ==.NET 9 SDK== | ||
| + | |||
| + | Prior to .NET 10, Microsoft had not published ARM64 packages for the .NET SDK, so we filled that gap in our Bookworm OS by creating our own .NET SDK installation packages. | ||
| + | |||
| + | < | ||
| + | sudo apt update | ||
| + | sudo apt install cpi-dotnet-sdk-9.0 | ||
| + | </ | ||
| + | |||
| + | ==.NET 8 SDK== | ||
| + | |||
| + | Prior to .NET 10, Microsoft had not published ARM64 packages for the .NET SDK, so we filled that gap in our Bookworm OS by creating our own .NET SDK installation packages. | ||
| + | |||
| + | < | ||
| + | sudo apt update | ||
| + | sudo apt install cpi-dotnet-sdk-8.0 | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Bullseye === | ||
| + | ComfilePi OS images dated 2022-07-26 or later have the .NET SDK already installed. | ||
| + | |||
| + | === Any OS === | ||
| + | |||
| + | Any version of the .NET SDK can be installed manually using the following commands. | ||
| + | |||
| + | <code bash> | ||
| + | DOTNET_VERSION=10.0 | ||
| + | wget https:// | ||
| + | chmod +x dotnet-install.sh | ||
| + | sudo ./ | ||
| + | sudo ln -s / | ||
| + | |||
| + | # Create a configuration file telling the system where to find the .NET runtime | ||
| + | sudo mkdir /etc/dotnet | ||
| + | sudo bash -c 'echo / | ||
| + | </ | ||
| + | |||
| + | Test the installation by running < | ||
| + | |||
| + | === Workaround for .NET ARM Linux Garbage Collection Bug (.NET 8 & 9 Only) === | ||
| + | |||
| + | **Important** - Due to [[https:// | ||
| + | < | ||
| + | DOTNET_GCHeapHardLimitPercent=32 | ||
| + | </ | ||
| + | |||
| + | Then reboot. | ||
| + | |||
| + | For more information about this setting, see [[https:// | ||
| + | |||
| + | |||
| + | ===== Install the .NET SDK on a Development PC ===== | ||
| + | |||
| + | It is likely much more convenient to author code on a development PC. To do that there are a few options: | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 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: | ||
| + | |||
| + | - Publish the application for the ComfilePi' | ||
| + | - Deploy the resulting binaries to a ComfilePi panel PC. | ||
| + | - Execute the binaries on the ComfilePi panel PC. | ||
| + | |||
| + | Those steps can all be done using using Visual Studio, the dotnet CLI, and/or Visual Studio Code. | ||
| + | |||
| + | * [[.: | ||
| + | |||
| + | See also [[https:// | ||
| + | ===== Debugging a Project ===== | ||
| + | |||
| + | To deploy to, launch and debug .NET applications on the ComfilePi from within Visual Studio or Visual Studio Code using the following extensions. | ||
| + | |||
| + | * [[: | ||
| + | * [[: | ||
| + | |||
| + | See also [[https:// | ||
| + | |||