# Building a tiny Windows tray app with .NET 9 Native AOT and raw Win32

> Source: <https://dev.to/cdilorenzo/building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32-2bcd>
> Published: 2026-07-11 09:09:33+00:00

I built CreditMeter, a small Windows tray app that shows GitHub Copilot AI-credit usage like a taxi meter.

##
Why I built it

Agentic coding makes AI usage feel invisible until you look at the bill.

##
Constraints

- no WinForms
- no WPF
- no backend
- no telemetry
- no dependency-heavy architecture

##
Tech stack

- C# / .NET 9
- Native AOT
- raw Win32 / PInvoke
- GitHub REST API
- DPAPI for local PAT storage

##
What I learned

For tiny tools, architecture is also about knowing what not to add.

##
Repo

[https://github.com/cdilorenzo/CreditMeter](https://github.com/cdilorenzo/CreditMeter)
