Blog
Blog posts on .NET, Azure, and more.
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.
Leveraging Small Language Model as a Sidecar for Linux App Service
July 06, 2025 by Anuraj
dotnet azure ai
In this blog post, we’ll learn how to use a small language model aka SLM as a sidecar for Linux App Service. A small language model (SLM) is a Gen AI technology that functions like a large language model (LLM), but with a much smaller footprint. Small language models (SLMs) are increasingly fine-tuned on domain-specific datasets, enabling them to excel in targeted applications like specialized chat bots, document summarization, and industry-specific information retrieval. Their compact size not only boosts efficiency in these focused tasks but also makes them ideal for deployment on devices with limited computational resources—such as mobile phones, IoT devices, or edge computing environments—bringing the benefits of generative AI to more accessible and resource-constrained settings.
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