.NET
48 guides on .NET.
30 .NET AI & Agent Interview Questions (With Answers That Actually Land)
The AI questions .NET developers are being asked in 2026 — fundamentals, Microsoft.Extensions.AI, the Agent Framework, RAG, tools and production concerns — with model answers and what each one is really testing.
Run Your Whole AI Agent Stack Locally with Aspire (Ollama + Qdrant + Traces)
Wire an LLM, a vector database and your API into one F5 with Aspire — no docker-compose, no API keys during development, and OpenTelemetry traces of every model call for free.
RAG vs Fine-Tuning: How to Actually Decide (A .NET Engineer's Guide)
RAG or fine-tuning? A decision framework based on what your problem actually is — knowledge, behaviour, format or cost — plus what each one really costs to run on .NET.
Migrating from Semantic Kernel to the Microsoft Agent Framework: A C# Walkthrough
A line-by-line C# migration from Semantic Kernel agents to the Microsoft Agent Framework — namespaces, agent creation, threads, tools, invocation, options and DI, with before/after code for each.
Text-to-SQL in .NET: Letting Users Query a Database in Plain English (Safely)
Build a natural-language-to-SQL feature in C# — schema grounding, a read-only execution boundary, statement validation and the failure modes that decide whether it survives production.
Choosing a Vector Database for .NET: pgvector vs Qdrant vs Azure AI Search vs SQL Server
A practical comparison of the vector stores .NET can talk to — pgvector, Qdrant, Azure AI Search, SQL Server 2025, Redis, Cosmos DB and SQLite — and why the choice matters less than you think.
The A2A (Agent2Agent) Protocol for .NET Developers
What the A2A (Agent2Agent) protocol is, how it differs from MCP, and how .NET developers build A2A agents in C# with the A2A SDK and Microsoft Agent Framework.
The Agent Harness in Microsoft Agent Framework (.NET Guide)
The Agent Harness in Microsoft Agent Framework gives .NET agents sandboxed shell execution, file access, and human-in-the-loop approvals. How to wire it up.
Agent Skills for .NET: A Practical Guide
Agent Skills for .NET is now stable in the Microsoft Agent Framework. Learn how to package, distribute, and govern agent skills in C#, with working code.
Foundry IQ and Agent Memory: Managed RAG and Memory for .NET Agents
Foundry IQ gives .NET agents serverless retrieval, knowledge bases, and managed memory. What it replaces in your RAG stack, and when to keep pgvector.
What BUILD 2026 Means for .NET Agent Developers
Build 2026 for .NET agent developers: Agent Harness, Hosted Agents, Agent Skills, CodeAct, and Foundry IQ memory — what shipped, why it matters, what to do.
Using the Anthropic Claude API in C#
How to call Anthropic's Claude models from C#: authenticate, send a message, stream the response, and use Claude through the provider-agnostic Microsoft.Extensions.AI abstraction.
Azure OpenAI vs OpenAI: Which Should .NET Developers Use?
Azure OpenAI or the OpenAI API? A clear comparison for .NET developers — on data residency, authentication, models, and cost — with a straight recommendation.
Caching LLM Responses in .NET
LLM calls are slow and cost money. Add caching to your .NET AI app — response caching and prompt caching — to cut latency and spend without losing quality.
Build a "Chat with your PDF" App in .NET
Let users ask questions about a PDF and get grounded answers. Build a chat-with-your-documents app in C# using extraction, embeddings, and retrieval-augmented generation.
Content Moderation and Guardrails for .NET AI Apps
User input and AI output both need checking. How to add content moderation and guardrails to a .NET AI app — filtering unsafe input, output, and enforcing scope.
How to Count Tokens in C#
Tokens drive LLM cost and context limits. How to count tokens in C# with a tokenizer, estimate cost before a call, and keep prompts under the model's limit.
Embeddings in .NET, Explained
What are embeddings, and how do you generate and use them in C#? A clear, practical explanation of vector embeddings for .NET developers — with code and use cases.
Using Google Gemini in C# and .NET
How to call Google's Gemini models from C#: get an API key, send a prompt, stream responses, and use Gemini through a provider-agnostic interface in .NET.
Microsoft.Extensions.AI: The .NET AI Abstraction, Explained
Microsoft.Extensions.AI gives .NET one common interface for every AI provider. What IChatClient and IEmbeddingGenerator are, why they matter, and how to use them.
How to Use Function Calling with OpenAI in C#
Function calling lets an OpenAI model trigger your C# code. A step-by-step guide to defining functions, letting the model call them, and returning the result — in .NET.
Vector Search in .NET with pgvector and PostgreSQL
You do not need a new database for vector search. Use pgvector in PostgreSQL from .NET to store embeddings and run similarity queries — with the database you already run.
Prompt Engineering for .NET Developers
Prompt engineering, minus the hype. Practical techniques .NET developers can use to get reliable, consistent output from an LLM — with C# examples.
Chunking Strategies for RAG (with .NET Examples)
Bad chunking is the #1 reason RAG underperforms. A practical guide to chunking strategies — size, overlap, and structure-aware splitting — for .NET RAG apps.
Resilient LLM Calls in .NET with Polly
LLM APIs rate-limit, time out, and hiccup. Make your .NET AI calls resilient with Polly — retries with backoff, circuit breakers, and timeouts done right.
Building Semantic Search in C# with Embeddings
Keyword search misses meaning. Build semantic search in C# using embeddings and vector similarity, so queries match by intent — not just matching words.
Serverless AI: Deploy an OpenAI Endpoint with Azure Functions
Host an AI endpoint that scales to zero and costs nothing when idle. Build and deploy a serverless OpenAI-powered API in .NET with Azure Functions.
Adding Memory and State to Your .NET Agent
A stateless agent forgets everything between messages. How to give a .NET agent short-term memory with threads, persist it across sessions, and add long-term memory.
Build an AI Chatbot in Blazor with .NET
A practical guide to building an AI chatbot in Blazor: wire up a chat UI, stream the model's response token-by-token, and keep the conversation in state — all in C#.
Building Your Own MCP Server in C#
Expose your tools to any AI agent by building an MCP server in C#. A practical walkthrough of the Model Context Protocol server SDK, defining tools, and choosing a transport.
Build Your First Tool-Using AI Agent in C#
A step-by-step tutorial: build an AI agent in C# with the Microsoft Agent Framework that calls your own tools, remembers the conversation, and chains multiple tool calls.
Choosing a Model for Your .NET Agent
GPT-class, small, or open-weight? A practical framework for picking the right LLM for a .NET agent, balancing capability, latency, cost, and where the model runs.
Cost Control for Production AI Agents in .NET
AI agent bills scale with usage and can surprise you. Practical techniques for controlling token spend in .NET agents: right-sizing, caching, context trimming, and budgets.
Deploy a .NET AI Agent to Azure Container Apps
Take a .NET AI agent from your laptop to production on Azure Container Apps: containerize it, wire up secrets with managed identity, deploy, and scale to zero when idle.
Running a .NET AI Agent on Google Kubernetes Engine (GKE)
Deploy a .NET AI agent to GKE the production way: containerize, authenticate with Workload Identity instead of keys, expose it through an ingress, and autoscale on load.
Function Calling vs MCP: When to Use Which in .NET
Should a tool be a C# method or an MCP server? A clear decision guide for .NET agents on when to use built-in function calling versus the Model Context Protocol.
How to Call the OpenAI API from C# (2026 Guide)
A step-by-step guide to calling the OpenAI API from C#: install the SDK, send your first chat completion, stream responses, and keep your API key safe in .NET.
Running a Local LLM in .NET with Ollama
Run an LLM locally and call it from C# with Ollama — no API key, no cloud, no per-token cost. How to connect .NET to a local model and when local makes sense.
Multi-Agent Orchestration in .NET: Graph Workflows Explained
Coordinating multiple AI agents by prompt alone is fragile. Here is how the Microsoft Agent Framework's graph-based workflows make multi-agent systems in .NET explicit, testable, and observable.
Observability for AI Agents with OpenTelemetry in .NET
When an agent misbehaves, logs are not enough. How to instrument a .NET agent with OpenTelemetry so you can see every tool call, token, and decision it made.
Giving Your .NET Agent a Knowledge Base: RAG in C#
Your agent does not know your documents — until you add retrieval. A practical guide to RAG in .NET: embeddings, a vector store, and grounding an agent in your own data.
Securing AI Agents in .NET: Auth, Secrets, and Guardrails
An AI agent that can call tools is a new attack surface. A practical security checklist for .NET agents: authenticating callers, protecting secrets, and guardrailing tool use.
Semantic Kernel vs the Microsoft Agent Framework: Which Should You Use in 2026?
Semantic Kernel or the Microsoft Agent Framework? Since the 1.0 GA merge, the answer changed. A clear breakdown of what to use for new projects and how to migrate existing ones.
Streaming AI Agent Responses to a Web UI in .NET
Waiting for a full agent response feels broken. Learn how to stream tokens from a .NET agent to the browser with Server-Sent Events, so answers appear word-by-word.
Structured Output from .NET Agents: Getting Reliable JSON in C#
An agent that returns prose is hard to program against. How to get reliable, strongly-typed JSON out of a .NET agent — with schemas, typed responses, and validation.
Testing and Evaluating AI Agents in .NET
AI agents are non-deterministic, but that does not make them untestable. A practical strategy for unit-testing tools, mocking the model, and evaluating agent quality in .NET.
The Microsoft Agent Framework for .NET: A Developer's Guide
Microsoft Agent Framework 1.0 unifies Semantic Kernel and AutoGen into one .NET SDK for building AI agents. Here is what it is, why it exists, and how to build your first agent in C#.
Model Context Protocol for .NET Developers: Giving Your Agent Real Tools
A practical guide to Model Context Protocol (MCP) for .NET developers: connect a Microsoft Agent Framework agent to an MCP server and expose your own agent as one.