Generative AI for Beginners .NET: a five-lesson course with runnable C# samples
Five lessons, learn how to really apply AI to your .NET Applications
At a glance
- What is it?
- Microsoft's Generative AI for Beginners .NET is a hands-on course, not a library. It pairs short videos with runnable samples that talk to Azure OpenAI, Microsoft Foundry, or a local Ollama model, and its sample tree has moved well past the five lessons in the README table.
- Who is it for?
- Adopt this if you are a .NET developer who already writes C# and wants working code for chat, agents and local models rather than theory. Skip it if you need a supported library with a versioning contract: this is teaching material, and its sample folders churn as the Agent Framework moves between preview, RC and GA.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 15 days ago.
- What is it written in?
- Mainly C#, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What the course is for, and who it is not for
The problem this repository addresses is narrow and real. A .NET developer who wants to add a chat completion, a tool call or an agent loop to an existing C# application has plenty of conceptual material and very few runnable starting points that use the same language they ship in. The course answers that with short videos and complete samples. The README describes the format directly: "Short 5-10 minute videos for each lesson" plus "Fully functional .NET code samples you can run and explore."
It is aimed at developers who already write C#. The lesson list begins with what generative AI is and how it differs from traditional programming, then moves to techniques, patterns, agents and responsible AI. That ordering assumes you can read a console app and a project file without help. If you are not a .NET developer, the language choice is the first obstacle and the samples will not teach you C#.
The repository is a course, not a package. There is no NuGet artifact named after it and nothing to reference from your own solution. You copy patterns out of the samples. That distinction matters when you evaluate it against a library: nothing here is versioned for you, and nothing here promises an API surface that will survive your next upgrade.
How the lessons, samples and provider configuration fit together
The top level of the repository splits into numbered lesson folders (01-IntroductionToGenerativeAI through 05-ResponsibleAI), a 10-WhatsNew archive, and a samples directory containing AppsWithGenAI, CoreSamples, MAF and PracticalSamples. The README's lesson table covers the five numbered folders. The sample folders are where most of the recent work has landed, and the README's own What's New section points at them rather than at the lesson table.
The provider story is the part worth understanding before you clone. The README lists three ways to get a model: Azure OpenAI Services, Microsoft Foundry, and Ollama for local hosting. GitHub Codespaces is offered as the setup path, and the repository carries a .devcontainer directory for it. Setup scripts sit at the root: setup.ps1, setup-secrets.ps1 and cleanup.ps1, alongside azure.yaml and an infra directory, which suggests the Azure path is provisioned rather than clicked through by hand.
The most recent addition is local inference. The August 2026 update describes ten samples under samples/CoreSamples that run models locally through Microsoft Foundry Local, covering chat, streaming, audio transcription, agent tools and live speech-to-text, with the README claiming "zero cloud costs and full offline capability." The agent samples live under samples/MAF and target the Microsoft Agent Framework. The README records that all 28 MAF samples moved from preview to stable v1.0 packages in April 2026, and that this included a breaking rename: Microsoft.Agents.AI.AzureAI became Microsoft.Agents.AI.Foundry. If you find older code in a blog post or a fork, that rename is the first thing that will break your build.
Getting it running: Codespaces, secrets, and a first sample
The README offers GitHub Codespaces as the fast path and local development as the alternative. It asks you to fork the repository rather than clone it, and the Codespaces configuration in .devcontainer is what makes the hosted environment work.
For a local run you need the .NET SDK. The repository ships dotnet-install.sh at the root, which is the script Microsoft publishes for installing the SDK without a system package manager.
./dotnet-install.shSecrets come next. The root contains setup-secrets.ps1, and the Azure path is described by azure.yaml with infrastructure under infra. Running the secrets script is what populates the configuration the samples read; the README excerpt available here does not spell out the exact keys, so open the script and read it before running it rather than assuming a variable name.
./setup-secrets.ps1After that, pick a sample folder and build it. Each sample is its own project, so the working directory matters. A successful restore and compile is what you should see; a failure on a missing Microsoft.Agents.AI.* package means you are in a sample that has not been migrated to the stable names, and the README's note about the AzureAI to Foundry rename is the likely cause. The local-model samples under samples/CoreSamples avoid cloud credentials entirely, which makes them the better first target if you have no Azure subscription.
Where the course stops being enough
The README is candid that the provider-specific material is optional and off the recommended path: Claude-via-Foundry integrations and legacy video-generation experiments are described as "useful reference material, but they are not part of the current recommended beginner-to-advanced learning path." That is a fair label, and it also tells you the repository carries samples at different levels of upkeep. A folder being present is not evidence that it reflects current APIs.
The bigger limitation is that a course cannot be a compatibility guarantee. The Agent Framework samples went from preview to release candidate to stable v1.0 inside roughly a year, with a package rename along the way. The README documents an upgrade plan file, MAF-V1-UPGRADE-PLAN.md, at the root, which is a sign that migration is a tracked activity rather than a finished one. If you build a production agent by copying a sample, you inherit the responsibility for tracking those changes yourself.
There is also no rollback story. The README does not document how to revert a sample or an environment to a previous state, and the presence of cleanup.ps1 suggests the intended recovery path is to tear down and start again. That is acceptable for a learning environment and awkward for anything you have extended.
Finally, the course is not a substitute for evaluation of the models themselves. Nothing in the README discusses output quality, latency or cost per token. You get working plumbing, and you still have to decide whether the model behind it is good enough.
How it compares with Semantic Kernel and the Agent Framework directly
The honest alternative is not another course. It is the libraries the samples call into. Semantic Kernel is one of the repository's topics and appears in the Microsoft AI stack the first lesson covers; the Microsoft Agent Framework is the other, and the samples/MAF folder exists to demonstrate it.
The difference in approach is straightforward. A framework gives you an API with a version number, release notes and a support expectation. It assumes you already know what an agent loop or a plugin is and want the primitives. This course assumes the opposite: that you need to see a chat call, then a tool call, then a multi-agent workflow, each as a small runnable program, before the primitives mean anything. It teaches by example and leaves the API contract to the upstream project.
That makes them complementary rather than competing. If you already know which framework you are using, reading its own documentation and samples is faster than working through five lessons. If you do not yet know whether you want a single chat call or a hosted multi-agent service, the progression here from lesson 01 to the MAF samples is a reasonable way to find out. The two hosted agent scenarios, MAF-HostedAgent-01-TimeZone and MAF-HostedAgent-02-MultiAgent, are the clearest signal of where the material points once you leave the basics: containerized agents deployed to the Foundry Agent Service.
Maintenance, licensing and what an upgrade costs you
The repository is not archived, and the last push was on 2026-08-31, which is recent. The release history shows three entries: 2026-08-24, 2025-07-21 and 2025-07-02. The gap between July 2025 and August 2026 is visible in that list, so the cadence is better described as bursty than steady. The What's New section is the practical signal to watch, since it is where the README records breaking changes.
The licence is MIT, stated in the README badge and present as a LICENSE file at the root. For a course repository that means you can copy sample code into your own project, including commercial work, provided you keep the licence notice. This is not legal advice, and it does not cover the models or services the samples call: Azure OpenAI, Microsoft Foundry and Foundry Local each carry their own terms, and running a sample locally does not change the terms attached to the model weights you download.
The upgrade cost sits with the samples you copy. The README's own note about the Microsoft.Agents.AI.AzureAI to Microsoft.Agents.AI.Foundry rename is the concrete example: code that compiled under the preview packages will not compile under the stable ones without edits. Budget for reading the upstream release notes for the Agent Framework, not just this repository, if you take a sample into production.
Editorial conclusion
Adopt this if you are a .NET developer who already writes C# and wants working code for chat, agents and local models rather than theory. Skip it if you need a supported library with a versioning contract: this is teaching material, and its sample folders churn as the Agent Framework moves between preview, RC and GA. Before you start, check the sample folder you intend to run, since the README's five-lesson table does not cover samples/CoreSamples or samples/MAF, and confirm which package names that folder currently references.
Frequently asked questions
How do I learn Generative AI as a beginner with the .NET course?
Start at lesson 01, Introduction to Generative AI, which covers what generative AI is, how it differs from traditional programming, and how to run samples in GitHub Codespaces or configure local development. Each lesson pairs a 5-10 minute video with a runnable .NET sample.
Which AI is best for .NET developers according to this course?
The README does not rank models. It lists three ways to get one: Azure OpenAI Services, Microsoft Foundry, and Ollama for local model hosting, plus Microsoft Foundry Local for the ten local samples added in August 2026.
How does a .NET developer learn AI with this repository?
The course is organized as five numbered lessons plus sample folders, and the README frames it as hands-on and practical rather than theoretical, with live coding and complete code samples. The MAF samples under samples/MAF go further into agents and multi-agent workflows.
Is Generative AI for Beginners .NET suitable for complete beginners?
It assumes you already write C#. The lesson order starts with what generative AI is, but the samples are .NET applications you are expected to build and run, so the course teaches AI concepts rather than the language.
Community notes