11 Commits
Author SHA1 Message Date
JMR-dev e23feff44d dropped support for WinForms and .NET 4.7.2. Refactored to modern .NET and C# 2026-06-10 22:41:05 -05:00
MadLongTomandPhyxionNL aa7c8be02f feat: Add Native AOT compilation support for LibreHardwareMonitorLib (#2280)
* feat: Add Native AOT compilation support for LibreHardwareMonitorLib

- Replace non-generic Marshal.GetDelegateForFunctionPointer with generic versions
  (NvApi.cs, NvidiaML.cs, OpCode.cs)
- Replace non-generic Marshal.PtrToStructure/SizeOf with generic versions
  (AtiAdlxx.cs, AmdGpu.cs, Ipmi.cs)
- Replace reflection-based Mono.Posix calls with direct Syscall for non-NETFRAMEWORK
  (OpCode.cs)
- Add DynamicallyAccessedMembers annotations for trim-safe generic marshaling
  (MsiCoreLiquidController.cs, WireViewPro2.cs)
- Add IsAotCompatible, IsTrimmable, and AOT/trim analyzers to csproj for net8.0+
- All changes maintain full backward compatibility with net472/netstandard2.0

Tested: dotnet publish with PublishAot=true on net10.0 win-x64 succeeds.
AOT binary correctly enumerates all hardware and sensors without errors.

* feat: Add conditional compilation for .NET 5.0 or greater in various classes

* feat: Add AOT test project and update workflows for AOT compilation

* Drop test project

* NET5_0_OR_GREATER > NET

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-04-07 13:38:41 +02:00
PhyxionNL d594734225 Move remainder to CsWin32 (#1918) 2025-09-30 18:58:21 +02:00
PhyxionNL 1d7b3223c9 Move more to CsWin32 (#1917) 2025-09-30 16:50:44 +02:00
PhyxionNLandCopilot ee60348eac Use CsWin32 (#1912)
* Use CsWin32

* Update LibreHardwareMonitorLib/Hardware/Cpu/CpuLoad.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update LibreHardwareMonitorLib/Hardware/Battery/BatteryGroup.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pull requests.yml

* Update pull requests.yml

* Update master.yml

* A couple more to CsWin32

* Restore PawnIO defaults

Fixes #1910

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 18:48:00 +02:00
PhyxionNL 64e38a4d40 Cleanup thread affinity and support > 64 threads. 2023-03-14 17:01:03 +01:00
PhyxionNL 58cef111a1 Use file-scoped namespaces (#842) 2022-10-09 13:22:57 +02:00
Florian Porsch ca615c952f Fix crash of LibreHardwareMonitorLib using Linux and Net5 / Add RAM support for linux (#573)
Thanks to @Tederean.
2022-02-07 17:18:16 +01:00
Phyxion 3cc3d9139c Add support for multiple processor groups.
Merge from upstream.
2020-05-11 13:29:52 +02:00
Phyxion 5bd108167d Restore OHM in copyright statement 2020-02-28 11:39:25 +01:00
Nick Babcock f4fb5ad13b Fix source file names on case sensitive file systems (#192)
Source file names will now match the class names.
2020-01-06 10:24:18 +01:00