A step-by-step beginner guide for .NET developers on Windows 10/11. Learn how to install Node.js, Git, and Claude Code, get an Anthropic API key, and have your first AI-powered coding session up and running in under 30 minutes.
Wait — What Even Is Claude Code?
Imagine having a senior developer sitting right next to you — one who never gets tired, never judges your questions, and can read, write, and understand your entire codebase in seconds. That is Claude Code in a nutshell. It is Anthropic’s AI-powered coding assistant that lives right inside your terminal, and it can help you build features, fix bugs, write tests, refactor code, and explain complex logic — all through plain, natural conversation.
If you are a .NET developer on Windows who has heard about Claude Code but had no idea where to even begin, you are in the right place. We are going to go from absolute zero to your first working Claude Code session, step by step, in plain English. No fluff, no assumed knowledge — just the exact steps you need.
Windows 10 or 11 users with some .NET development experience. You do not need any JavaScript or Node.js background — we will cover everything you need.
The Big Picture: What We Are Installing
Before we dive in, here is a quick map of what we are about to do so nothing feels random:
- Node.js — Claude Code runs on Node.js, so we need this first
- Git — Claude Code integrates deeply with Git, and you probably want version control anyway
- Claude Code — installed globally via npm (Node’s package manager)
- Anthropic API Key — your personal key that connects Claude Code to Anthropic’s AI models
That is it. Four things, and by the end of this guide all four will be set up and working.
Step 1: Install Node.js
Claude Code is distributed as an npm package, which means you need Node.js on your machine. If you have never touched Node before, do not worry — think of it the same way you think of the .NET runtime. It is just a runtime that lets JavaScript-based tools run on your machine.
Download Node.js
Go to the official Node.js website and download the LTS (Long-Term Support) version. LTS is the stable one — not the newest, but the most reliable. Always pick LTS for development tools.
Run the Installer
Once the .msi file downloads, double-click it and run through the installer. The defaults are fine for everything. There is one screen that asks about "Tools for Native Modules" — you can leave that unchecked unless you know you need it. Just click Next, Next, Next, Install.
node and npm from any terminal window.
Verify Node.js is Installed
After the installer finishes, open a fresh Command Prompt or PowerShell window (important: open a new one, not an existing one) and run:
node --version
npm --version
You should see version numbers printed out, something like v22.x.x for Node and 10.x.x for npm. If you see those, Node.js is installed and ready.
Step 2: Install Git for Windows
Claude Code works best when your project is a Git repository. It uses Git to understand your file changes, help with commits, and give you better context-aware suggestions. Even if you have used Git through Visual Studio’s GUI, you need the Git command-line tools installed for Claude Code to work properly.
Download Git
https://git-scm.com/download/win
The download will start automatically for 64-bit Windows
Install Git (Key Settings to Pick)
The Git installer has a lot of screens. Here are the important ones — leave everything else at defaults:
- Default editor: Change this to "Visual Studio Code" or "Notepad" if you prefer not to use Vim
- "Adjusting your PATH environment": Choose "Git from the command line and also from 3rd-party software" — this is the middle option and is the right choice
- Line endings: Choose "Checkout Windows-style, commit Unix-style" — the default, leave it as is
Everything else can stay as the default. Click through and install.
Verify Git
Open a new terminal and run:
git --version
You should see something like git version 2.47.x.windows.1.
Step 3: Check Your Environment Variables
This is the part that trips up most people on Windows, so let’s be thorough. Both Node.js and Git need to be in your system’s PATH variable so that any terminal window can find them.
The installers should have handled this automatically, but let’s double-check:
- Press Windows + S and search for "Environment Variables"
- Click "Edit the system environment variables"
- Click "Environment Variables..." in the bottom right
- Under "System variables", find "Path" and double-click it
You should see entries that include paths like:
C:\Program Files\nodejsC:\Program Files\Git\cmd
If both of those are present (or similar paths), you are good. If either is missing, click New and add the path manually.
node -v && git --version. If both print version numbers, your PATH is set up correctly.
Step 4: Install Claude Code
Now for the main event. Claude Code is installed as a global npm package, which means you install it once and it is available everywhere on your machine — just like how you might install the dotnet CLI.
Open PowerShell as Administrator (right-click PowerShell, choose "Run as Administrator") and run:
npm install -g @anthropic-ai/claude-code
This will download and install Claude Code globally. It might take 30–60 seconds. You will see some progress output. Once it finishes, verify the install:
claude --version
If you see a version number, Claude Code is installed. Simple as that.
EACCES or permission denied, that is what is happening — re-run as Administrator.
https://docs.anthropic.com/en/docs/claude-code/overview
Always a good place to check for the latest updates
Step 5: Get Your Anthropic API Key
Claude Code needs an API key to talk to Anthropic’s AI models. Think of it as a username+password combined into a single secret string that identifies your account.
Create an Anthropic Account
If you do not have one yet, go to the Anthropic Console and sign up. It is free to create an account.
Generate an API Key
- Log in to the Anthropic Console
- Click on "API Keys" in the left sidebar
- Click "Create Key"
- Give it a name like "My Claude Code" — just so you can identify it later
- Click "Create"
- Copy the key immediately — you will only see it once
Understanding Billing
Anthropic charges based on how much you use the API (tokens in and out). For a developer using Claude Code moderately, costs are typically very reasonable — a few dollars a month. You can set spending limits in the Console under Billing → Usage Limits to make sure you are never surprised. I recommend setting a monthly cap when you first get started.
Step 6: Log In to Claude Code
Now let’s connect everything together. Navigate in your terminal to any project folder (or just your Desktop for now) and run:
claude
The first time you run Claude Code, it will ask how you want to authenticate. You will see options like:
- Log in with Anthropic (browser-based OAuth)
- Enter API key manually
Option A: Browser Login (Easiest)
Choose the browser login option. Claude Code will open your browser and ask you to log in to your Anthropic account. Once you approve, it handles everything automatically — no copying and pasting keys needed. This is the recommended approach for most people.
Option B: API Key (Manual)
If you prefer to use your API key directly, choose that option and paste the key you copied in Step 5. Claude Code will save it securely for future sessions.
Alternatively, you can set it as an environment variable before running Claude Code:
# In PowerShell (current session only):
$env:ANTHROPIC_API_KEY = "sk-ant-your-key-here"
claude
# Or set it permanently via System Environment Variables
# Variable name: ANTHROPIC_API_KEY
# Variable value: sk-ant-your-key-here
ANTHROPIC_API_KEY with your key as the value. Then you never have to set it again on this machine.
Step 7: Your First Claude Code Session
Let’s try it out for real. Navigate to one of your .NET projects and fire up Claude Code:
cd C:\Projects\MyDotNetApp
claude
Claude Code will start, read your project structure, and drop you into an interactive chat. Try asking it something like:
> Explain what this project does
> What are the main controllers in this ASP.NET app?
> Add a GET endpoint to return all users as JSON
> Fix the bug on line 42 in HomeController.cs
Watch as it reads your actual files, understands your codebase, and responds with code that fits your project. It is not generating generic boilerplate — it knows your folder structure, your namespaces, your naming conventions. That is what makes it genuinely useful.
Running Claude Code Without Entering Chat
You can also use Claude Code for one-off tasks without entering the interactive mode:
# Ask a single question and get an answer
claude "explain what HomeController does"
# Run a specific task
claude "add XML comments to all public methods in UserService.cs"
Useful Commands to Know
Here are the commands you will reach for most often as you get started:
| Command | What It Does |
|---|---|
claude | Start interactive session in current folder |
claude "your question" | One-shot question, no interactive mode |
claude --help | Show all available options |
claude --version | Check installed version |
/help (inside session) | Show in-session commands |
/clear (inside session) | Clear conversation context |
/exit (inside session) | Exit Claude Code |
Ctrl + C | Cancel current operation |
Pro Tips for .NET Developers
Since you are coming from a .NET background, here are a few things that will make your Claude Code experience much smoother right from the start:
1. Always Run from Your Project Root
Claude Code reads your project by looking at the files around it. Always cd into your solution or project root before running claude. If you run it from a random folder, it will not have the right context.
2. Let It See Your .sln File
Claude Code handles multi-project solutions well. Running it from the folder containing your .sln file gives it the best view of everything — multiple projects, shared libraries, the whole picture.
3. Be Specific With Your Requests
Instead of saying "add a feature", say "add a POST endpoint at /api/orders that accepts an OrderDto and saves it to the Orders table via EF Core". The more specific you are, the better the result. You already know how to write requirements — just apply that same clarity here.
4. Use It for Code Review
> Review this class for any potential issues, security concerns, or improvements
It is like having a code review at any hour of the day.
5. Ask It to Write Tests
> Write xUnit tests for the UserService class covering all public methods
Test writing is one of Claude Code’s strongest use cases — it understands your code and generates tests that actually match your patterns.
Troubleshooting Common Issues
“claude is not recognized as an internal or external command”
This means npm’s global bin folder is not in your PATH. Run npm config get prefix to find where global packages are installed, then add that path to your system PATH variable (same process as Step 3). Restart your terminal after.
“401 Unauthorized” Error
Your API key is wrong or expired. Go back to the Anthropic Console, generate a new key, and update your ANTHROPIC_API_KEY environment variable.
“429 Rate Limit Exceeded”
You are sending too many requests too fast, or you have hit your usage limit. Check your Console dashboard. If you just signed up, new accounts sometimes have lower initial rate limits that increase over time.
Node.js or npm Not Found After Install
Close all terminal windows completely and open a fresh one. If it still does not work, log out and back into Windows. In rare cases a full restart is needed for PATH changes to take effect.
What to Learn Next
Once you have the basics working, here are some great next steps to go deeper:
https://github.com/anthropics/claude-code
Source, issues, and the latest release notes
https://docs.anthropic.com/en/docs/claude-code/best-practices
How to get the most out of Claude Code on real projects
https://docs.anthropic.com/en/docs/about-claude/models
Learn about Claude Sonnet, Opus, and Haiku — and when to use each
Wrapping Up
That is it — you now have a fully working Claude Code setup on Windows. Let’s quickly recap what you did:
- ✅ Installed Node.js (the runtime Claude Code needs)
- ✅ Installed Git (for version control and deeper Claude Code integration)
- ✅ Verified your PATH so all tools work from any terminal
- ✅ Installed Claude Code globally via npm
- ✅ Created an Anthropic account and generated an API key
- ✅ Logged in and ran your first session
The first few sessions might feel a bit different from what you are used to. Instead of writing every line yourself, you are directing an AI that can write, read, and modify code on your behalf. It takes a little getting used to — but once it clicks, going back feels painfully slow.
Give it a real project, be specific with what you want, and let it surprise you. Welcome to the future of .NET development.