<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yaroslav Gorohov</title>
    <description>The latest articles on DEV Community by Yaroslav Gorohov (@yaroslav_gorohov_a4e9e516).</description>
    <link>https://dev.to/yaroslav_gorohov_a4e9e516</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3840772%2F0b15d364-457c-4b5a-b20e-5f3b35e80fab.png</url>
      <title>DEV Community: Yaroslav Gorohov</title>
      <link>https://dev.to/yaroslav_gorohov_a4e9e516</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yaroslav_gorohov_a4e9e516"/>
    <language>en</language>
    <item>
      <title>I built a Visual Studio extension where AI programs using real OOP tools (Roslyn tree, debugger, UI automation)</title>
      <dc:creator>Yaroslav Gorohov</dc:creator>
      <pubDate>Mon, 23 Mar 2026 20:54:15 +0000</pubDate>
      <link>https://dev.to/yaroslav_gorohov_a4e9e516/i-built-a-visual-studio-extension-where-ai-programs-using-real-oop-tools-roslyn-tree-debugger-ui-3ilf</link>
      <guid>https://dev.to/yaroslav_gorohov_a4e9e516/i-built-a-visual-studio-extension-where-ai-programs-using-real-oop-tools-roslyn-tree-debugger-ui-3ilf</guid>
      <description>&lt;p&gt;Hi devs.&lt;/p&gt;

&lt;p&gt;I’m a C# developer working mostly with large enterprise .NET solutions.&lt;br&gt;
Over the last few months I’ve been building something that completely changed how I use AI for coding.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;p&gt;👉 Stop letting AI edit code as plain text.&lt;br&gt;
👉 Let AI work with real program structure.&lt;/p&gt;

&lt;p&gt;Because on real projects — the usual AI workflow breaks very fast.&lt;/p&gt;

&lt;p&gt;If you’ve tried using AI on big .NET solutions, you probably saw this:&lt;/p&gt;

&lt;p&gt;AI reads entire files just to change one method&lt;br&gt;
misses overloads and hidden dependencies&lt;br&gt;
breaks partial classes&lt;br&gt;
generates syntax that compiles “by luck”&lt;br&gt;
wastes huge token context on irrelevant code&lt;/p&gt;

&lt;p&gt;This is fine for scripts.&lt;/p&gt;

&lt;p&gt;But on enterprise solutions with hundreds of files — reliability drops quickly.&lt;/p&gt;

&lt;p&gt;So I changed the architecture.&lt;/p&gt;

&lt;p&gt;💡 Connecting AI directly to the Roslyn compiler&lt;/p&gt;

&lt;p&gt;Instead of text diffs, I built an MCP server that exposes structured OOP tools.&lt;/p&gt;

&lt;p&gt;Now AI can request a semantic model like:&lt;/p&gt;

&lt;p&gt;solution → projects → namespaces → classes → members&lt;/p&gt;

&lt;p&gt;It can also query:&lt;/p&gt;

&lt;p&gt;inheritance trees&lt;br&gt;
interface implementations&lt;br&gt;
method overloads&lt;br&gt;
call graphs&lt;br&gt;
references and usages&lt;/p&gt;

&lt;p&gt;So AI doesn’t “guess”.&lt;/p&gt;

&lt;p&gt;It works with compiler-verified structure.&lt;/p&gt;

&lt;p&gt;Example tasks AI can perform:&lt;/p&gt;

&lt;p&gt;create a class implementing an interface&lt;br&gt;
safely rename a member&lt;br&gt;
add methods with correct signatures&lt;br&gt;
refactor code using Roslyn transformations&lt;br&gt;
instantly receive diagnostics&lt;/p&gt;

&lt;p&gt;All syntax is generated by Roslyn — not by prompt magic.&lt;/p&gt;

&lt;p&gt;🧠 Context efficiency on large projects&lt;/p&gt;

&lt;p&gt;Instead of loading massive files into prompts, AI requests only the exact structured data it needs.&lt;/p&gt;

&lt;p&gt;On big solutions this improves:&lt;/p&gt;

&lt;p&gt;speed&lt;br&gt;
precision&lt;br&gt;
token usage&lt;br&gt;
refactoring safety&lt;/p&gt;

&lt;p&gt;This was one of the biggest practical wins.&lt;/p&gt;

&lt;p&gt;🐞 Runtime control: debugger + UI automation&lt;/p&gt;

&lt;p&gt;Then I went further.&lt;/p&gt;

&lt;p&gt;The extension now allows AI to control Visual Studio and the running application:&lt;/p&gt;

&lt;p&gt;build and run projects&lt;br&gt;
attach debugger&lt;br&gt;
set breakpoints&lt;br&gt;
step through execution&lt;br&gt;
inspect locals&lt;br&gt;
automate UI (click buttons, fill forms, capture screenshots)&lt;/p&gt;

&lt;p&gt;So AI can actually test what it writes.&lt;/p&gt;

&lt;p&gt;In the demo below AI creates a full WinForms app using SOLID architecture, then runs and tests it through UI automation.&lt;/p&gt;

&lt;p&gt;🎬 Demo video:&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=skvnHbm2lpk" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=skvnHbm2lpk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔌 Works with multiple AI assistants&lt;/p&gt;

&lt;p&gt;The extension uses MCP, so it works with:&lt;/p&gt;

&lt;p&gt;Claude Code&lt;br&gt;
GitHub Copilot&lt;br&gt;
OpenAI Codex&lt;br&gt;
Cursor&lt;br&gt;
other MCP-compatible agents&lt;/p&gt;

&lt;p&gt;I also ported the Claude Code chat UI into Visual Studio (still beta), so everything can run inside one IDE window.&lt;/p&gt;

&lt;p&gt;📦 Availability&lt;/p&gt;

&lt;p&gt;Previous versions are free and open:&lt;/p&gt;

&lt;p&gt;GitHub:&lt;br&gt;
&lt;a href="https://github.com/yarhoroh/RoslynMCP-Public" rel="noopener noreferrer"&gt;https://github.com/yarhoroh/RoslynMCP-Public&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visual Studio Marketplace:&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=YaroslavHorokhov.RoslynMcp" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=YaroslavHorokhov.RoslynMcp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re working with large C# solutions and experimenting with AI —&lt;br&gt;
I’d genuinely love to hear your feedback.&lt;/p&gt;

&lt;p&gt;What would you want AI to control inside the IDE?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>csharp</category>
      <category>dotnet</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
