AI and Azure

AI and Azure for .NET Developers: Tutorials and Learning Path

This hub covers the two skills US .NET teams are hiring for most right now: adding AI to C# apps, and running those apps on Azure. Every AI and Azure .NET tutorial here uses .NET 10 and real, runnable code.

You’ll get the most out of it once you’re comfortable with C# and ASP.NET Core.

By Bijay Kumar, 13-time Microsoft MVP · Updated October 2026

AI in .NET: The Building Blocks

You don’t need Python to build AI features. These are the main Microsoft libraries for adding generative AI to C# apps.

Library or serviceWhat it’s for
Microsoft.Extensions.AIOne set of interfaces (IChatClient, IEmbeddingGenerator) for calling OpenAI, Azure OpenAI, Ollama and other model providers from C#
Microsoft Agent FrameworkMicrosoft's framework for building AI agents and multi-agent workflows in .NET, the successor to Semantic Kernel and AutoGen
MCP C# SDKThe official ModelContextProtocol NuGet packages for building MCP servers and clients, so AI assistants can call your .NET code
Azure OpenAIOpenAI models hosted in your Azure subscription, with Microsoft Entra ID sign-in and enterprise data controls

Start with Microsoft.Extensions.AI. Because your code talks to the IChatClient interface, you can switch from OpenAI to Azure OpenAI or a local model without rewriting it. If interfaces are new to you, read interfaces in C# first.

Azure for .NET Developers

These are the Azure services most .NET apps use. Our tutorials cover each one from C#.

ServiceUse it to
Azure App ServiceHost ASP.NET Core and Blazor apps without managing servers
Azure Functions (isolated worker)Event-driven and scheduled C# code; the isolated worker model supports .NET 10
Azure SQL DatabaseManaged SQL Server for EF Core apps
Azure Key VaultKeep connection strings and API keys out of appsettings.json
AspireRun and wire up a multi-service app (API, database, cache) locally, then deploy it to Azure

Running Azure Functions on the in-process model? Microsoft ends support for it on November 10, 2026, the same day .NET 8 and .NET 9 reach end of support. Move to the isolated worker model on .NET 10. See .NET versions and support dates.

Learning Path

Follow these steps in order. Tutorials for each step are linked here as they’re published.

  1. Call an AI model from C#

    Install Microsoft.Extensions.AI, connect an IChatClient to Azure OpenAI or OpenAI, and stream a response in a console app.

  2. Build an AI chat app

    Add chat to an ASP.NET Core or Blazor app, keep the conversation history and let the model call your C# functions as tools.

  3. Build agents and MCP servers

    Use Microsoft Agent Framework for agents, and expose your own data to AI assistants with an MCP server written in C#.

  4. Deploy to Azure

    Publish an ASP.NET Core app to Azure App Service, store secrets in Key Vault and set up CI/CD with GitHub Actions.

  5. Serverless with Azure Functions

    Write C# functions on the isolated worker model with HTTP, timer and queue triggers.

Frequently Asked Questions

Can I build AI apps with C# instead of Python?

Yes. Microsoft.Extensions.AI, Microsoft Agent Framework and the official MCP C# SDK let you call models, build agents and expose tools entirely in C#, with the same dependency injection and logging you already use in ASP.NET Core.

What is Microsoft.Extensions.AI?

It’s a set of .NET libraries that give you common interfaces, such as IChatClient and IEmbeddingGenerator, for working with AI services. Your code depends on the interface, and you plug in a provider like OpenAI, Azure OpenAI or Ollama.

Should I use Semantic Kernel or Microsoft Agent Framework?

For new agent projects, use Microsoft Agent Framework, which Microsoft positions as the successor to Semantic Kernel and AutoGen. For simple chat or summarization calls, Microsoft.Extensions.AI on its own is enough.

When does the Azure Functions in-process model end?

Support for the in-process model for .NET apps ends on November 10, 2026. After that it gets no security or feature updates, so migrate to the isolated worker model, which supports .NET 10.

What is Aspire?

Aspire (formerly .NET Aspire) is a toolkit for building, running and deploying apps made of several services, such as a web front end, an API, a database and a cache. Aspire 13 requires the .NET 10 SDK.