Claude Code for .NET Developers: From Zero to Productive in VS Code and Visual Studio 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. 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. The 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. This 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. Claude 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. The 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. There are two surfaces you will use: claude — runs in any terminal, works with any editor anthropic.claude-code — 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. You need Node.js 22 LTS or later. Check with: node --version Install Claude Code globally: npm install -g @anthropic-ai/claude-code Authenticate: claude The 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 . Install the extension from the marketplace. The ID is anthropic.claude-code . You need VS Code 1.98 or later. Once 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 Windows/Linux or Cmd+Shift+C Mac to open a quick input without leaving your editor flow. The 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. If 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. Visual Studio has been the king of .NET IDEs for decades — it just has not heard of Claude yet. As 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. The workaround is simple and it works well: use the integrated terminal. Open it with View Terminal or Ctrl+\ . Then run: bash claude Claude Code starts in your repo's root directory. It reads everything — your .cs files, your .csproj , your appsettings.json , your CLAUDE.md . 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. Practical 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. This is the most important section in the article. Every time Claude Code starts in a directory, it performs a filesystem walk. It moves upward from the current working directory, looking for CLAUDE.md files. It also lazily loads CLAUDE.md files found in subdirectories as it encounters them during work. The result is a layered context system: a root CLAUDE.md for the whole repo, and optionally per-project or per-module files for specific concerns. CLAUDE.md is 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. Without any instruction file, Claude Code will: With a good CLAUDE.md , Claude knows your exact dotnet commands, your test runner, your architecture decisions, your naming conventions, and any constraints specific to your project. It stops guessing and starts working. CLAUDE.md lives at the root of your repository — the same directory as your .sln file. Visual Studio's Solution Explorer shows files based on what is referenced in .csproj or .sln files. Since CLAUDE.md is not referenced by either, it will not appear in Solution Explorer. This 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. To verify what Claude has loaded, run: plaintext /memory This lists all context files currently active in the session. If CLAUDE.md is loaded, it appears here. This is your ground truth. Here is an example for a realistic ASP.NET Core project: markdown ASP.NET Core 10 minimal API backed by PostgreSQL via EF Core 10. Authentication: JWT with ASP.NET Core Identity. Deployed to Azure Container Apps via GitHub Actions. bash dotnet build OrderService.sln bash dotnet test OrderService.sln dotnet test tests/OrderService.UnitTests/ dotnet test OrderService.sln --collect:"XPlat Code Coverage" src/OrderService.Api/ — minimal API endpoints, no business logic here src/OrderService.Domain/ — domain models, value objects, interfaces src/OrderService.Application/ — CQRS handlers MediatR , validators FluentValidation src/OrderService.Infrastructure/ — EF Core, repositories, external HTTP clients tests/OrderService.UnitTests/ — xUnit, Moq, domain and application layer only tests/OrderService.IntegrationTests/ — xUnit, Testcontainers, full API stack record types for immutable domain models and DTOs field keyword instead of explicit backing fields where applicable var — use explicit types everywhere .Result or .Wait Features/ folders grouped by domain concept vertical slice src/OrderService.Infrastructure/Migrations/ dotnet ef migrations add