How I Stopped Fighting AI Context: JetBrains AI vs. Copilot in Rider
Last Tuesday, I was staring at a System.NullReferenceException: Object reference not set to an instance of an object. (Parameter 'serviceProvider') in a new Program.cs file, trying to boot up a .NET 9 API. The kicker? The code came almost entirely from an AI assistant. I'd been trying to leverage JetBrains AI Assistant and GitHub Copilot in Rider 2026 to speed up a legacy .NET 7 service migration, and honestly, the context dance between them was driving me a little nuts.
For a while, I felt like I was spending more time debugging AI output than writing actual code. My goal was simple: use AI to offload boilerplate, understand unfamiliar patterns in a large codebase, and generally accelerate my daily work. What I ended up with initially was a chaotic mix of half-baked suggestions and context-blind refactors. It took some serious trial and error, but I think I've finally settled on a pragmatic approach that works for me.
The Context Conundrum: Where My Assumptions Broke Down
My initial mistake was treating both JetBrains AI Assistant (powered by Claude Sonnet 4.6) and GitHub Copilot (the latest Copilot for Workspaces version) as interchangeable, all-knowing oracles. I'd ask a question in the chat window, or expect an inline completion to magically understand my entire project structure. This almost never worked.







