{"slug": "claude-code-for-net-developers-from-zero-to-productive-in-vs-code-and-visual", "title": "Claude Code for .NET Developers: From Zero to Productive in VS Code and Visual Studio", "summary": "Anthropic's Claude Code, a CLI-first agentic coding assistant, is now available for .NET developers through VS Code and JetBrains Rider, with a workaround for Visual Studio via integrated terminal. The tool operates on actual repositories, reading files, running commands, and editing code autonomously, and its reliability depends on understanding context management and custom commands like CLAUDE.md. Installation requires Node.js 22 LTS and the global npm package @anthropic-ai/claude-code, with VS Code extension support for inline diffs and selection sharing.", "body_md": "Here is the pattern that plays out constantly with AI coding tools: you try one, it blows your mind. You use it for a week, and it starts feeling random. Sometimes it's brilliant; sometimes it confidently suggests code from three framework versions ago. You stop trusting it, and it fades into the \"cool but not practical\" category.\n\nThe problem is not the model. The problem is that you are using a powerful tool without understanding how it works. Claude Code is different from a chat window, and once you understand its mechanics — how it discovers context, how you shape its behavior, how you extend it with custom commands — it becomes genuinely reliable for .NET work.\n\nThis article covers everything: installation, VS Code integration, the honest story about Visual Studio 2022 and 2026, CLAUDE.md (the most important file you are not writing yet), context management, Skills, and MCP. Whether you are new to AI tooling or already use it daily, there is something here for you.\n\nClaude Code is not a chatbot that happens to know about code. It is a CLI-first, agentic coding assistant built by Anthropic. The key distinction: it operates on your actual repository. It can read files, run commands, edit code, and chain multiple steps together without you narrating every move.\n\nThe mental model that helps most: Claude Code is a skilled contractor who just walked into your codebase. Give them the right context, and they can work independently. Give them nothing, and they will ask questions — or worse, make assumptions.\n\nThere are two surfaces you will use:\n\n`claude`\n\n) — runs in any terminal, works with any editor`anthropic.claude-code`\n\n) — embeds the CLI experience directly into VS Code, with file awareness, selection sharing, and inline diffsBoth use the same model and the same context system. The extension is additive convenience on top of the CLI, not a separate product.\n\nYou need Node.js 22 LTS or later. Check with:\n\n```\nnode --version\n```\n\nInstall Claude Code globally:\n\n```\nnpm install -g @anthropic-ai/claude-code\n```\n\nAuthenticate:\n\n```\nclaude\n```\n\nThe first run opens a browser for OAuth with your Anthropic account. After that, your credentials are stored locally and the CLI works offline-first (the model calls still go to Anthropic's API, of course).\n\nInstall the extension from the marketplace. The ID is `anthropic.claude-code`\n\n. You need VS Code 1.98 or later.\n\nOnce installed, a Claude icon appears in the activity bar. Open it, sign in, and you have a chat panel that is deeply aware of your open files, your current selection, and your workspace structure. You can also invoke it inline with `Ctrl+Shift+C`\n\n(Windows/Linux) or `Cmd+Shift+C`\n\n(Mac) to open a quick input without leaving your editor flow.\n\nThe extension does something important automatically: when you highlight code and ask a question, it attaches that selection as context. You do not have to copy-paste. This alone saves significant friction on large codebases.\n\nIf you use **JetBrains Rider**, there is also full Claude Code integration available through the JetBrains Marketplace. The experience is comparable to VS Code. Rider users are covered — you can follow this entire article and apply it directly.\n\nVisual Studio has been the king of .NET IDEs for decades — it just has not heard of Claude yet.\n\nAs of June 2026, there is no official Claude Code extension for Visual Studio 2022 or 2026. GitHub Copilot has deep VS integration; Claude Code does not. This is not a temporary oversight — the extension model for Visual Studio is substantially different from VS Code, and Anthropic has focused on the VS Code surface.\n\nThe workaround is simple and it works well: use the integrated terminal.\n\nOpen it with `View > Terminal`\n\n(or `Ctrl+\\`\n\n`). Then run:\n\n`bash`\n\nclaude\n\nClaude Code starts in your repo's root directory. It reads everything — your `.cs`\n\nfiles, your `.csproj`\n\n, your `appsettings.json`\n\n, your `CLAUDE.md`\n\n. The terminal-based experience is the same CLI you would use anywhere. You lose the inline diff rendering and selection-sharing that the VS Code extension provides, but the model's capabilities are identical.\n\nPractical tip: keep Visual Studio open for debugging, the designer, and refactoring tooling (where it is unmatched), and open VS Code or a terminal alongside it for Claude interactions. Many .NET developers already do this. It is not a compromise — it is using each tool for what it is best at.\n\nThis is the most important section in the article.\n\nEvery time Claude Code starts in a directory, it performs a filesystem walk. It moves upward from the current working directory, looking for `CLAUDE.md`\n\nfiles. It also lazily loads `CLAUDE.md`\n\nfiles found in subdirectories as it encounters them during work. The result is a layered context system: a root `CLAUDE.md`\n\nfor the whole repo, and optionally per-project or per-module files for specific concerns.\n\n`CLAUDE.md`\n\nis not magic. It is just a Markdown file. But it is the file Claude reads before doing anything else. Think of it as your onboarding document for a contractor who starts fresh every session.\n\nWithout any instruction file, Claude Code will:\n\nWith a good `CLAUDE.md`\n\n, Claude knows your exact `dotnet`\n\ncommands, your test runner, your architecture decisions, your naming conventions, and any constraints specific to your project. It stops guessing and starts working.\n\n`CLAUDE.md`\n\nlives at the root of your repository — the same directory as your `.sln`\n\nfile. Visual Studio's Solution Explorer shows files based on what is referenced in `.csproj`\n\nor `.sln`\n\nfiles. Since `CLAUDE.md`\n\nis not referenced by either, it will not appear in Solution Explorer.\n\nThis trips people up. They create the file, it does not show up in VS, they assume something is wrong. Nothing is wrong. Claude loads it perfectly. Open it directly in VS Code or a plain text editor to edit it.\n\nTo verify what Claude has loaded, run:\n\n`plaintext`\n\n/memory\n\nThis lists all context files currently active in the session. If `CLAUDE.md`\n\nis loaded, it appears here. This is your ground truth.\n\nHere is an example for a realistic ASP.NET Core project:\n\n``markdown`\n\nASP.NET Core 10 minimal API backed by PostgreSQL via EF Core 10.\n\nAuthentication: JWT with ASP.NET Core Identity.\n\nDeployed to Azure Container Apps via GitHub Actions.\n\n``bash`\n\ndotnet build OrderService.sln\n\n`\n\n``bash`\n\ndotnet test OrderService.sln\n\ndotnet test tests/OrderService.UnitTests/\n\ndotnet test OrderService.sln --collect:\"XPlat Code Coverage\"\n\n```\n\n`src/OrderService.Api/`\n\n— minimal API endpoints, no business logic here`src/OrderService.Domain/`\n\n— domain models, value objects, interfaces`src/OrderService.Application/`\n\n— CQRS handlers (MediatR), validators (FluentValidation)`src/OrderService.Infrastructure/`\n\n— EF Core, repositories, external HTTP clients`tests/OrderService.UnitTests/`\n\n— xUnit, Moq, domain and application layer only`tests/OrderService.IntegrationTests/`\n\n— xUnit, Testcontainers, full API stack`record`\n\ntypes for immutable domain models and DTOs`field`\n\nkeyword instead of explicit backing fields where applicable`var`\n\n— use explicit types everywhere`.Result`\n\nor `.Wait()`\n\n`Features/`\n\nfolders grouped by domain concept (vertical slice)`src/OrderService.Infrastructure/Migrations/`\n\n`dotnet ef migrations add <Name> --project src/OrderService.Infrastructure --startup-project src/OrderService.Api`\n\n`dotnet ef database update --project src/OrderService.Infrastructure --startup-project src/OrderService.Api`\n\n`dynamic`\n\nor `object`\n\nas return types\n\nplaintextThis file takes about fifteen minutes to write and saves hours of back-and-forth over the lifetime of a project. The investment is obvious once you have it.\n\nIf you are not starting from scratch, Claude Code can inspect your repo and generate a first draft:\n\n/init\n\n`plaintext`\n\nThis reads your solution structure, existing documentation, and common patterns, then writes a `CLAUDE.md`\n\nthat reflects what it found. Treat the output as a starting point — review it, correct anything wrong, and add the domain knowledge Claude cannot infer (architecture decisions, team conventions, known pitfalls).\n\nEven with a great `CLAUDE.md`\n\n, you will often need to point Claude at specific files during a conversation. The `@`\n\nmention syntax does this precisely.\n\n@Program.cs\n\n`csharp`\n\nAttaches the full content of `Program.cs`\n\nto the current message.\n\n@src/OrderService.Application/\n\n`plaintext`\n\nAttaches a directory listing. Claude will then read specific files from it as needed, rather than loading everything upfront.\n\n@appsettings.json#1-20\n\n`plaintext`\n\nAttaches only lines 1 through 20. Useful when you care about a specific section of a large config file and do not want to burn context on the rest.\n\nWhen you use the VS Code extension, any code you highlight in the editor is automatically shared when you open the Claude panel. You do not need `@`\n\nmentions for your active selection — it is already there. This makes \"explain this method\" or \"what does this LINQ query do\" workflows completely frictionless.\n\nLong sessions accumulate context. After several hours of work, Claude's context window fills with earlier conversation turns that are no longer relevant. When responses start feeling less sharp, run:\n\n/compact\n\n`plaintext`\n\nThis summarizes the conversation history into a compressed form, freeing up context space without losing the thread of what you have been working on. Think of it as telling the contractor to forget the small talk and remember only the decisions.\n\nSkills are reusable, invocable commands that extend Claude Code's default behavior. They live as Markdown files and you invoke them with a `/`\n\nprefix, just like built-in commands. There are two scopes:\n\n`~/.claude/skills/<skill-name>/SKILL.md`\n\n. Available in every project on your machine.`.claude/skills/<skill-name>/SKILL.md`\n\nin your repo root. Checked into source control, shared with the team.A skill file is a Markdown document that tells Claude what to do when invoked. It can include steps, decision logic, expected outputs, and even inline prompts.\n\nHere are three practical examples for .NET development.\n\n`/dotnet-test`\n\n**File:** `.claude/skills/dotnet-test/SKILL.md`\n\n``markdown`\n\nRun the test suite for this project and summarize the results.\n\n`dotnet test`\n\nusing the command from CLAUDE.md (check the \"Tests\" section).Group failures by project. Keep the summary concise — one paragraph max,\n\nfollowed by a numbered list of failures if any exist.\n\n`\n\nInvoke with `/dotnet-test`\n\n. Claude runs your test command, reads the output, and gives you a clean summary instead of a wall of terminal text.\n\n`/csharp-review`\n\n**File:** `.claude/skills/csharp-review/SKILL.md`\n\n``markdown`\n\nReview the provided C# code for modern idiom usage and correctness.\n\n`record`\n\nor `record struct`\n\nwould be more appropriate?`init`\n\nwould suffice?`if`\n\n/`switch`\n\nchains that could use `switch`\n\nexpressions or positional patterns?`!`\n\nsuppressors hiding problems?`field`\n\nkeyword`field`\n\nkeyword could eliminate?`.Result`\n\n, `.Wait()`\n\n, or `async void`\n\noutside of event handlers?List each finding as:\n\nEnd with a one-sentence overall assessment.\n\n`\n\nInvoke with `/csharp-review`\n\nwhile a file is open (or with `@filename`\n\nif using the CLI). You get actionable, .NET-specific feedback rather than generic suggestions.\n\n`/ef-migrate`\n\n**File:** `.claude/skills/ef-migrate/SKILL.md`\n\n``markdown`\n\nGuide through EF Core migration management for this project.\n\n`dotnet ef migrations list`\n\ncommand from CLAUDE.md to show existing migrations.\nUse the correct `--project`\n\nand `--startup-project`\n\nflags from CLAUDE.md.`dotnet ef migrations add <Name>`\n\nwith correct flags`dotnet ef database update`\n\nwith correct flagsAlways mention that migrations modify the database schema. Remind the user to review\n\ngenerated migrations before applying to staging or production environments.\n\n`\n\nThis skill turns what is normally a multi-step, flag-heavy CLI workflow into a guided conversation. It uses the migration commands already defined in your `CLAUDE.md`\n\n, so it adapts to each project automatically.\n\nModel Context Protocol (MCP) is a standard that lets Claude connect to external data sources and tools beyond your local filesystem. Where Skills extend what Claude *does*, MCP extends what Claude can *see*.\n\nA few examples relevant to .NET teams:\n\nMCP servers are configured in your Claude Code settings and are available across all sessions. For .NET teams working in Azure DevOps or GitHub, setting up the corresponding MCP server once pays dividends on every PR review and sprint planning task after that.\n\nBoth IDEs are legitimate for .NET work. Here is where each one stands with Claude Code:\n\n| Feature | VS Code + Claude Extension | Visual Studio 2022/2026 + Terminal |\n|---|---|---|\n| Claude Code integration | Native extension, inline diffs, selection sharing | Terminal only, CLI-based |\n| Debugging experience | Good (but not VS-level) | Best in class for .NET |\n| CLAUDE.md support | Full | Full (file not shown in Solution Explorer) |\n| Skills / MCP | Full | Full (terminal invocation) |\n| Designer tools (WinForms, WPF) | Limited | Full |\n| Refactoring tools | Good | Excellent (ReSharper-level built-in) |\n| Hot Reload / Edit and Continue | Good | Best in class |\n| Extension ecosystem | Vast | .NET-focused, deep OS integration |\n| Cost | Free | Community free; Pro/Enterprise paid |\n\nThe pragmatic answer for most .NET developers: use both. VS Code for AI-assisted coding, exploration, and file editing; Visual Studio for debugging sessions, UI designers, and deep refactoring. They open the same project files and there is no conflict. Many developers keep both open simultaneously without issue.\n\nIf you have to pick one: pure backend services (ASP.NET Core APIs, worker services, console apps) work well with VS Code as your primary. Anything with Windows Forms, WPF, or complex debugger needs warrants Visual Studio as primary with Claude Code in the terminal.\n\n**CLAUDE.md is not optional** — it is the difference between an AI that guesses and one that knows your codebase. Write it, commit it, keep it current. Run `/init`\n\nto generate a starting point from your existing repo.\n\n**Visual Studio is fully usable** — the lack of a native extension is a real limitation, but `View > Terminal`\n\nand the `claude`\n\nCLI give you full Claude Code functionality. The file-awareness and Skills system work identically.\n\n**Context is everything** — use `@`\n\nmentions to target specific files, use line ranges to stay precise, and use `/compact`\n\nwhen sessions get long. Precision in context leads to precision in output.\n\n**Skills are multipliers** — a fifteen-minute investment writing a project skill pays back immediately. Codify your team's review criteria, your test workflow, your migration process. Claude Code executes them consistently every time.\n\n**The model is not random — your context is** — when Claude gives you a bad answer, the fix is almost always better context: a clearer `CLAUDE.md`\n\n, a more specific `@`\n\nmention, or a well-written skill. Understanding the context system turns a frustrating tool into a reliable one.\n\nThe architecture is simple once you see it: CLAUDE.md tells Claude who you are and how your project works, `@`\n\nmentions tell Claude what to look at right now, and Skills tell Claude how to handle your recurring tasks. Stack those three things on top of a capable model and the \"random magic\" feeling goes away entirely. What you get instead is a coding assistant that behaves like someone who has actually read the codebase.\n\nWhich, thanks to CLAUDE.md, it has.", "url": "https://wpnews.pro/news/claude-code-for-net-developers-from-zero-to-productive-in-vs-code-and-visual", "canonical_source": "https://dev.to/jgomezdev/claude-code-for-net-developers-from-zero-to-productive-in-vs-code-and-visual-studio-3cm6", "published_at": "2026-06-15 22:57:25+00:00", "updated_at": "2026-06-15 23:17:09.057995+00:00", "lang": "en", "topics": ["developer-tools", "large-language-models", "ai-tools", "ai-agents"], "entities": ["Anthropic", "Claude Code", "VS Code", "Visual Studio", "JetBrains Rider", "Node.js", "GitHub Copilot"], "alternates": {"html": "https://wpnews.pro/news/claude-code-for-net-developers-from-zero-to-productive-in-vs-code-and-visual", "markdown": "https://wpnews.pro/news/claude-code-for-net-developers-from-zero-to-productive-in-vs-code-and-visual.md", "text": "https://wpnews.pro/news/claude-code-for-net-developers-from-zero-to-productive-in-vs-code-and-visual.txt", "jsonld": "https://wpnews.pro/news/claude-code-for-net-developers-from-zero-to-productive-in-vs-code-and-visual.jsonld"}}