I tested using the commands and C# code below, and can successfully generate WinForm window exe files. File size: 13M+, and it can successfully execute on computers without .NET8 runtime installed!
Considering both execution speed and file size, it is well worth it—especially for console or background service programs, where the footprint becomes even smaller.
I haven't found the previous version of LA (that supports .NET8 SDK) yet.
___________________________________________________________________cmd
cd C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.3
bflat build main.cs -r System.Windows.Forms.dll -r System.Windows.Forms.Primitives.dll -r System.Drawing.Common.dll -r Accessibility.dll -r Microsoft.Win32.SystemEvents.dll --ldflags "/subsystem:windows"
___________________________________________________________________main.cs
using System;
using System.Windows.Forms;
Application.Run(new Form());
Considering both execution speed and file size, it is well worth it—especially for console or background service programs, where the footprint becomes even smaller.
I haven't found the previous version of LA (that supports .NET8 SDK) yet.
___________________________________________________________________cmd
cd C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.3
bflat build main.cs -r System.Windows.Forms.dll -r System.Windows.Forms.Primitives.dll -r System.Drawing.Common.dll -r Accessibility.dll -r Microsoft.Win32.SystemEvents.dll --ldflags "/subsystem:windows"
___________________________________________________________________main.cs
using System;
using System.Windows.Forms;
Application.Run(new Form());
