Blog

Blog posts on .NET, AI, Azure, and more.

Using Central Package Management with .NET solutions

August 30, 2025 by Anuraj

dotnet csharp

Working on a big .NET solution with tons of projects? Tired of juggling different package versions? Central Package Management keeps everything in one spot so all our projects use the same version-simple and hassle-free. In this blog post we will explore how to use Central Package Management feature. When we use this feature, we won’t be using the version attribute in the project references, instead we will be keeping the references globally for all the projects in the solution. And if we require a specific version for a project we can override that as well.

Running C# files with dotnet run command

July 30, 2025 by Anuraj

dotnet csharp

In .NET 10 Preview 4, Microsoft introduced a new feature in .NET which helps to run .net apps directly using dotnet run command. Earlier versions, like .NET 8 or .NET 9, if we want to try a C# code snippet, we need to create a console app or webapp or webapi project and test the code. With this new feature, we can create the C# file and try it with dotnet run command.

Build your first MCP Server in .NET and C#

July 20, 2025 by Anuraj

dotnet ai mcp csharp

In the earlier blog post, I mentioned about the Microsoft.Extensions.AI.Templates - which comes with a MCP Server project template. We will be using this template to create MCP Server. MCP servers are services that expose capabilities to clients through the Model Context Protocol (MCP).

Exploring the new AI chat template

July 18, 2025 by Anuraj

dotnet ai

In this blog post, we’ll explore the new AI chat project template - we will discuss - how to install the project template, creating and configure various options. The .NET AI Chat Web App is a new template from Microsoft that shows how to get started building a chat style application backed by a large language model (LLM). This project template helps us to create two project types - Local MCP Server Console App and AI Chat Web App - We will explore the MCP project template in a later blog post. The AI Chat Web App project template is for creating an AI chat application, which uses retrieval-augmented generation (RAG) to chat with your own data.

Getting started with Microsoft.Extensions.AI

July 14, 2025 by Anuraj

dotnet ai

In this blog post, we’ll learn how to use a Microsoft.Extensions.AI in our .NET applications. In my earlier post I was using Microsoft.Extensions.AI to connect to my local SLM. We can use Microsoft.Extensions.AI so that we can write code using AI abstractions rather than a specific SDK. AI abstractions enable us to change the underlying AI model with minimal code changes. For this demo I am using Open AI API Key. We can use Azure Open AI or GitHub Models or Ollama. We can get the Open AI API Key from here. Once created, use dotnet user secret tool to store the key as secret or set the key as environment variable.

Copyright © 2025 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub