Skip to main content

Posts

Checkout a Git repository using a tag in VSCode

If you're working with Git repositories in Visual Studio Code, you might occasionally need to checkout a specific tag—perhaps to review a previous release, test an older version, or understand how the codebase looked at a particular milestone. While VSCode's built-in Git integration is powerful, checking out tags wasn't immediately obvious to me. Let me walk you through the process. What are Git tags? Before diving in, a quick refresher: Git tags are references that point to specific commits in your repository's history. They're commonly used to mark release points (like v1.0.0, v2.1.3, etc.). Unlike branches, tags are meant to be immutable snapshots of your code at a particular moment in time. Checkout a Git tag in VS Code Method 1: Using the Command Palette The quickest way to checkout a tag in VSCode is through the Command Palette: Open the Command Palette by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) Type "Git: Checko...
Recent posts

Error when using the Microsoft Fabric Capacity Metrics app

The Microsoft Fabric Capacity Metrics app allows you to monitor your Microsoft Fabric capacities. You can use the app to monitor your capacity consumption and use these insights to decide when to scale (or setup autoscaling). After installing the Microsoft Fabric Capacity Metrics App , I noticed that no data was shown on the Health page: Clicking on the error details showed me the following info: The NoCapacitiesInRegion.Error message mentions that no capacity is available. So, let’s have a look at the assigned capacity for this workspace: The cause of this error is not related to having no capacity but to the fact that I had a Power BI Pro capacity assigned instead of a Fabric capacity. After changing to the Fabric capacity, the health page started to work as expected: Nice! More information What is the Microsoft Fabric Capacity Metrics app? - Microsoft Fabric | Microsoft Learn Understanding Microsoft Fabric Capacity and Throttling–A first attempt

Why AI helps you to discover new parts of your favorite SDK–The NullLogger

I'll admit it - I first encountered NullLogger in code generated by an AI coding assistant. At first glance, I almost dismissed it as one of those "AI quirks," but then I realized it was actually a real class available in the .NET Framework that I'd been missing out on. What is NullLogger? NullLogger is part of Microsoft.Extensions.Logging and implements the null object pattern for logging. It's a logger that does absolutely nothing - all of its methods are no-ops. While that might sound useless at first, it's actually quite valuable. Imagine you have the following code: Now when testing this code I would normally mock the logger, but thanks to the built-in NullLogger I no longer have to do that: How to use it In the example above I showed the typical way to get an ILogger<T> instance. There is also a non-generic one to create an ILogger instance: Both are singletons, so you're always getting the same instance - no memory overhe...

Testing your MCP server with Visual Studio HTTP Files

If you're building or testing Model Context Protocol (MCP) servers and you need a quick way to verify your endpoints are working correctly. Visual Studio's HTTP files ( .http ) provide an elegant, code-based approach to API testing What are Visual Studio HTTP files? HTTP files are plain text files with a .http or .rest extension that let you define and execute HTTP requests directly in your editor. They're supported in Visual Studio, Visual Studio Code (with the REST Client extension), and JetBrains IDEs. Think of them as executable documentation for your API. Why use HTTP files for MCP testing? The Model Context Protocol defines a JSON-RPC 2.0 interface for AI model interactions. Testing these endpoints traditionally meant using tools like Postman or curl commands, but HTTP files offer several advantages: Version control friendly : Store your test requests alongside your code Easy sharing : Team members can run the same tests instantly Fast iteration...

Passing parameters to a hosted MCP Server in C#

The Model Context Protocol (MCP) enables seamless integration between AI applications and external data sources. When working with MCP servers in C#, you'll often need to pass parameters to configure server connections, specify endpoints, or provide authentication details. This post walks you through the practical approaches to handling URL parameters when connecting to MCP servers. Understanding MCP transport mechanisms Before diving into configuration, it's crucial to understand the two primary ways MCP servers communicate, as this fundamentally impacts how you pass parameters. STDIO Transport involves running the MCP server as a child process that communicates through standard input/output streams. Your MCP client launches the server (typically a Node.js script or executable) and exchanges messages via stdin/stdout. This is the most common approach for local development and desktop applications. Hosted MCP Servers run as independent web services that expose Se...

Permission to experiment granted

In my post yesterday about shifting from "why" to "what" questions, I explored how this simple change can transform leadership conversations. Today, I want to focus on one specific question that came up in a related Coaching for Leaders podcast episode with Elizabeth Lotardo: What have you already tried? What makes this question so powerful? When someone comes to you with a problem and you ask, "What have you already tried?" you're sending several key messages simultaneously: You expect initiative. You're not surprised that they've already taken action—you assume it. This presumption of capability builds confidence. Experimentation is valued. By asking what they've tried , not what they've done , you're acknowledging that not everything works on the first attempt. And that's okay. Their attempts matter. Even if their experiments didn't solve the problem, the learning from those attempts is valuable informa...

The power of "What" over "Why"

Leadership isn't about having all the answers—it's about asking the right questions. I was reminded about this while listening to Shannon Minifie, CEO of Box of Crayons, on the Coaching for Leaders podcast ( Episode 760 ), where she explored how the quality of our questions shapes the quality of our leadership. The problem with "Why" As leaders, we're trained to dig deep, to understand root causes. "Why did this happen?" "Why didn't you finish that project?" These questions feel investigative and thorough. But here's what Minifie points out: "why" questions often put people on the defensive. When someone hears "Why did you do that?" their brain doesn't hear curiosity—it hears judgment. They start building walls instead of opening doors. The conversation shifts from exploration to explanation, from possibility to justification. The "What" alternative This connects directly to Michael Bungay Sta...