Skip to main content

Posts

Finding inspiration for good custom instructions for GitHub Copilot

One of the best ways to improve the results you get back from GitHub Copilot is by carefully defining your custom instructions. This helps the LLM to better understand your application, preferred technologies, coding guidelines, etc.. This information is shared with the LLM for every request, so you don’t have to provide all these details every time in your prompts. But creating such a set of custom instructions can be a challenge. If you are looking for inspiration, here are some possible sources: Awesome Copilot Instructions Link: Code-and-Sorts/awesome-copilot-instructions: ✨ Curated list of awesome GitHub copilot-instructions.md files Description: Contains a list of copilot instructions for different programming languages Cursor Rules Link: Free AI .cursorrules & .mdc Config Generator | Open Source Developer Tools Description: Originally created for the Cursor IDE but also applicable when defining custom instructions for GitHub Copilot. No examples for .NET or CSh...
Recent posts

Monitor your A/B test in .NET

I’ m currently working on a new feature in one of our microservices. As this new feature could have large performance impact, we did some performance benchmarks up front through BenchMarkDotNet . The results looked promising but we were not 100% confident that these results are representative for real life usage. Therefore we decided to implement A/B testing. Yesterday I showed how to implement A/B testing in .NET using .NET Feature Management . Today I want to continue on the same topic and show you how we added telemetry. Measuring and analyzing results The most critical aspect of A/B testing is measuring results. You need to track relevant metrics for each variation to determine which performs better. The most simple way to do this is to fall back to the built-in logging in .NET Core : Although this is a good starting point, we can simplify and improve this by taking advantage of the built-in telemetry through OpenTelemetry and/or Application Insights. Using OpenTelemetry...

A/B testing in .NET using Microsoft Feature Management

I’ m currently working on a new feature in one of our microservices. As this new feature could have a large performance impact, we did some performance benchmarks up front through BenchMarkDotNet . The results looked promising but we were not 100% confident that these results are representative for real life usage. Therefore we decided to implement A/B testing. In this post, we'll explore what A/B testing is, why it matters, and how to implement it effectively using .NET Feature Management . What is A/B testing? A/B testing, also known as split testing, is a method of comparing two versions of a web page, application feature, or user experience to determine which one performs better. In its simplest form, you show version A to half your users and version B to the other half, then measure which version achieves your desired outcome more effectively. The beauty of A/B testing lies in its scientific approach. Rather than making changes based on opinions or assumptions, you...

Avoiding unexpected costs from GitHub Copilot premium requests

Starting from last week June 18, 2025 an important change was activated in GitHub Copilot. From that day on you need to pay extra for any premium requests that exceed your monthly allowance. This means that we should start considering more how we use Copilot and be aware of the (potential) costs. What are premium requests? Premium requests are requests that use more advanced processing power and apply to any request that is not using the default models (GPT-4o and GPT-4.1 at the moment of writing this post). The number of premium requests you get out-of-the-box is different depending on the plan you are using: Important! Be also aware that a multiplier is applied to the cost depending on the model used. For some models (e.g. GPT-4.5) this can add up quickly as the multiplier can be as high as 50!   Disabling premium requests If you want to avoid unexpected costs, you can disable premium requests so that they don’t exceed your monthly allowance of premium requests. ...

Browse the .NET code base with the .NET Source Browser

Ever wondered how Microsoft is using some .NET features in it's own codebase? One way to find this out is through the .NET Source Browser . This site allows you to browse through all the .NET source files and find out how specific features are implemented or specific classes used. For example, I’m working on a piece of code where I wanted to use the Channels API but I was wondering how it was implemented. And what better place to learn than from the creators themselves? So I opened up the .NET Source Browser and searched for Channel.CreateBounded : This returned multiple results: When you click on a specific result you arrive at the specific source file and can further check the implementation: Another option is to go through the official .NET documentation and click on the source links there: This brings you to the code source in GitHub:   Have fun browsing through the codebase! More information Source Browser .NET API browser | Microsoft Learn

Untrusted GIT repositories in Visual Studio

For security reasons I am switching to a different account on my development machine. After adding this new account to Windows and setting up the Visual Studio configuration for this new account, I thought I was good to go. So I opened a first solution inside my fresh Visual Studio instance. Everything looked OK at first sight, but then I noticed a small warning message at the right bottom corner of my Visual Studio: And when I took a look at the Git Changes window, no changes were shown:   What is going on? Starting from Git v2.35.2 , Git now checks for ownership of the folder trying to ensure that the folder you are using Git in has the same user as the owner as your current user account. As the original Git repo(and corresponding Windows folders) was created using a different account, Git considers this repository as unsafe. This check was introduced in Git to tackle a security issue which allows parent repositories directories to override permissions of child reposi...

Detecting breaking changes in your OpenAPI metadata

For the last 2 days I have been struggling with a breaking change I had in my ASP.NET Core web api that caused the consuming application to fail. I had a header parameter that was optional but became required after changing the nullability of my project to enabled . Although I found the issue and was able to fix it quite fast, I was not happy with my current process and was wondering how I could prevent this from happening again. This brought me to a final solution where I introduced some extra tests that compared the OpenAPI metadata between different implementations. Let me show you how I did it… Generate OpenAPI documents at build time To compare 2 OpenAPI metadata documents we first need to get them. For the already released version of the API, I can download the document through the OpenAPI endpoint ( /openapi/v1.json by default). But what about the new version of the API that is still in development? I solve this by generating the OpenAPI document at build time. This m...