{"slug": "building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32", "title": "Building a tiny Windows tray app with .NET 9 Native AOT and raw Win32", "summary": "A developer built CreditMeter, a Windows tray app that displays GitHub Copilot AI-credit usage in real time. The app uses .NET 9 Native AOT, raw Win32 APIs, and the GitHub REST API, with no WinForms, WPF, or backend dependencies. The project demonstrates how to create minimal, dependency-free tools for monitoring AI service consumption.", "body_md": "I built CreditMeter, a small Windows tray app that shows GitHub Copilot AI-credit usage like a taxi meter.\n\n##\nWhy I built it\n\nAgentic coding makes AI usage feel invisible until you look at the bill.\n\n##\nConstraints\n\n- no WinForms\n- no WPF\n- no backend\n- no telemetry\n- no dependency-heavy architecture\n\n##\nTech stack\n\n- C# / .NET 9\n- Native AOT\n- raw Win32 / PInvoke\n- GitHub REST API\n- DPAPI for local PAT storage\n\n##\nWhat I learned\n\nFor tiny tools, architecture is also about knowing what not to add.\n\n##\nRepo\n\n[https://github.com/cdilorenzo/CreditMeter](https://github.com/cdilorenzo/CreditMeter)", "url": "https://wpnews.pro/news/building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32", "canonical_source": "https://dev.to/cdilorenzo/building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32-2bcd", "published_at": "2026-07-11 09:09:33+00:00", "updated_at": "2026-07-11 09:45:31.054350+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "artificial-intelligence"], "entities": ["CreditMeter", "GitHub Copilot", ".NET 9", "GitHub REST API", "DPAPI"], "alternates": {"html": "https://wpnews.pro/news/building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32", "markdown": "https://wpnews.pro/news/building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32.md", "text": "https://wpnews.pro/news/building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32.txt", "jsonld": "https://wpnews.pro/news/building-a-tiny-windows-tray-app-with-net-9-native-aot-and-raw-win32.jsonld"}}