Building an Azure DevOps Copilot using .NET 8, Semantic Kernel and Azure OpenAI GPT-4o

This post demonstrates how to create an Azure DevOps Copilot that utilizes a small subset of the Azure DevOps REST API. To achieve this, we will be using Semantic Kernel along with .NET 8 and Azure OpenAI.
Read more →

Getting started with OpenTelemetry and distributed tracing in .NET

OpenTelemetry is a collection of APIs, SDKs, tools, and integrations designed for the creation and management of telemetry data, including traces, metrics, and logs. In today’s post, I’m going to demonstrate how you can begin using OpenTelemetry (OTEL) and distributed tracing with .NET.
Read more →

Announcing dotnetramblings.com or how to build a .NET news aggregator site

Let’s check how I build my new site www.dotnetramblings.com. This site is a .NET news aggregator that updates its content every three hours. The main technologies employed to build it include Hugo, Python and Github Actions.
Read more →

Building and deploying a .NET 8 App on an ARM64 processor using Azure Pipelines and AWS ECS Fargate. Part 2: Demo

In this two-part series, I’m going to show you how to build and deploy a .NET 8 app container image that targets an ARM64 processor. In part 2, we will attempt to perform an end-to-end process. This will involve building a .NET 8 API, containerizing the app targeting an ARM64 processor using Azure Pipelines, and deploying it on AWS ECS Fargate. Furthermore, a benchmark will also be conducted to compare the performance of the application running on an ARM64 Fargate container versus an AMD64 Fargate container.
Read more →

Building and deploying a .NET 8 App on an ARM64 processor using Azure Pipelines and AWS ECS Fargate. Part 1: How to build multi-platform images

In this two-part series, I’m going to show you how to build and deploy a .NET 8 app container image that targets an ARM64 processor. In part 1, I’ll be discussing some key concepts that you should know about how to build .NET multi-platform images.
Read more →

An opinionated list of tips for building .NET 8 app templates

I have been developing .NET templates for quite some time, and as a result, I thought it might be helpful to compile a list of tips to consider when creating a .NET template for your own or your company’s apps.
Read more →

Getting started with OpenTelemetry Metrics in .NET 8. Part 2: Instrumenting the BookStore API

In this two-part series, I’m going to show you how to use OpenTelemetry to generate custom metrics and how to visualize those metrics using Prometheus and Grafana. In part 2, I’ll demonstrate how to add OpenTelemetry Metrics to a real life .NET 8 app and how to visualize those metrics using Prometheus and Grafana.
Read more →

Getting started with OpenTelemetry Metrics in .NET 8. Part 1: Key concepts

In this two-part series, I’m going to show you how to use OpenTelemetry to generate custom metrics and how to visualize those metrics using Prometheus and Grafana. In part 1, I’ll be discussing some key concepts that you should know when using OpenTelemetry Metrics with dotnet.
Read more →

Analyze Polly Telemetry using Prometheus, Grafana and OpenTelemetry Metrics

Starting with version 8, Polly provides Telemetry for all built-in strategies. This post will show you how you can send this Telemetry to Prometheus and Grafana for a more in-depth analysis using OpenTelemetry Metrics.
Read more →

Back to .NET basics: How to easily build a Strategy pattern using dependency injection

In this very brief post, we will see how easy is to build a Strategy pattern in .NET when using dependency injection.
Read more →

Back to .NET basics: How to properly use HttpClient

In this post, we will explore a few common scenarios where HttpClient is employed. For each scenario, we will discuss the reasons behind its proper or improper usage, using the help of the netstat command.
Read more →

Building a C# enhancing app using Azure OpenAI GPT-4 and Streamlit

This post demonstrates the simplicity of developing an app that can enhances a C# file using only GenAI’s basic skills. By utilizing Azure OpenAI GPT-4 model, the app can effortlessly add or improve XML comments, provide code explanations, suggest enhancements, and generate unit tests for any given C# file.
Read more →

Testing Chiseled Ubuntu container images with .NET

The objective of this post is to test Ubuntu Chiseled images in combination with .NET, evaluating whether it is truly worthwhile to migrate our .NET apps to utilize these base images or not.
Read more →

How to integrate your Roslyn Analyzer project with SonarQube

Right now there are 2 ways to add rules from a Roslyn Analyzer project into SonarQube. In this post I want to show you how both options work and also what’re the pros and cons of one over the other.
Read more →

5 ways to deploy a .NET Lambda using AWS CDK

This post is going to walk you through 5 different ways to deploy a .NET lambda using AWS CDK.
Read more →

How to modernize a legacy .NET Framework WCF app using CoreWCF and .NET 7

CoreWCF is a port of the Windows Communication Foundation (WCF) framework to the latest .NET version. The main goal of the CoreWCF project is to enable existing WCF services to be moved to .NET 7. In this post I’ll show you step by step how easy (or hard) is the process of migrating an existing .NET 4.7 WCF app to .NET 7 using the CoreWCF project.
Read more →

Trying out the built-in container support for the .NET SDK

A few months ago the built-in container support for the .NET SDK was announced. In this post I’ll put this feature to test, I’ll try to migrate from an application that contains a rather complex Dockerfile to a new version that has no Dockerfile and instead uses the container support feature.
Read more →

Keep your .NET platform images up to date using AWS ECR and Azure Pipelines

When talking about containers security on the enterprise one of the best practices is to use your own platform images, those platform images are the base for your company applications. In this post I’m going to show you an opinionated implementation of how to automate the creation and update of your own .NET platform images using Azure Pipelines and AWS ECR.
Read more →

How to easily check on your CI/CD pipelines if your app has a NuGet package with a security vulnerability

Almost any dotnet application has several NuGet dependencies, and those dependencies may have their own dependencies, and so on and so forth. What if any of those dependencies you’re using contains a security vulnerability? You can check on your CI/CD pipeline if your application has any known NuGet vulnerability with just a couple of lines of bash script.
Read more →

How to deploy a SignalR Core application to AWS

This post is about which AWS services can be used and how to set them up properly when you want to deploy a SignalR Core application to AWS.
Read more →

Linting a .NET 6 app Dockerfile using Hadolint, dockerfile_lint and Azure Pipelines

Like any other language, Dockerfiles can and should be linted for updated best practices and code quality checks. In this post I will show you how to incorporate a couple of Dockerfile linters into our Secure DevOps workflow to ensure our Dockerfiles are always readable, understandable and maintainable.
Read more →

Profiling a .NET6 app running on AWS ECS Fargate with dotnet-monitor

The dotnet-monitor tool is an alternative to the .NET CLI diagnostic tools. In this post I’ll show you how to deploy a .NET 6 application into AWS ECS Fargate with dotnet-monitor as a sidecar container, and afterwards how you can profile an app using the dotnet-monitor HTTP API.
Read more →

Profiling a .NET6 app running in a linux container with dotnet-trace, dotnet-dump, dotnet-counters, dotnet-gcdump and Visual Studio

This post contains a few practical examples showing you how to profile a .NET6 application running in a linux container using the .NET CLI diagnostic tools (dotnet-trace, dotnet-dump, dotnet-counters and dotnet-gcdump) and Visual Studio.
Read more →

Getting started with AWS Distro for OpenTelemetry and distributed tracing using .NET. Part 2: Building the demo

This is a 2 part-series post. In part 2 I’ll show you how to build and configure properly a few distributed .NET apps that will send traces to the AWS OTEL Collector, and also how to analyze those traces in AWS X-Ray.
Read more →

Getting started with AWS Distro for OpenTelemetry and distributed tracing using .NET. Part 1: Setting up the AWS OTEL Collector

This is a 2 part-series post. In part 1 I’ll be talking about what is the AWS OpenTelemetry Collector and how to set it up for ingesting and exporting traces to AWS X-Ray.
Read more →

Setting up the SonarQube scanner when building a .NET Core container image

If you’re using containers quite probably you’re doing the build, test and analysis steps inside the Dockerfile, and setting up the SonarQube scanner when building the image can be a little more cumbersome than usual, and that’s why I wanted to write a little bit about it.
Read more →

Securing a graphQL API with Azure Active Directory

In today’s post I want to talk about how you can secure a .NET graphQL API that uses HotChocolate (https://chillicream.com/) with Azure Active Directory.
Read more →

Some common gotchas when trying to deploy a dotnet gRPC app to AWS ECS

Lately I’ve been deploying a sizable amount of gRPC services to AWS ECS so I thought it might be useful to talk a little bit about some gotchas I have encountered. Some of the problems I’ll be talking about on this post are specific of the .NET implementation of gRPC and another ones are from the AWS side.
Read more →

How to build a .NET template and use it within Visual Studio. Part 2: Creating a template package

This is a 2 part-series post. In part 2 I’ll show you how to convert a few .NET apps into .NET templates, package them together in a single NuGet pack and use them as templates within Visual Studio.
Read more →

How to build a .NET template and use it within Visual Studio. Part 1: Key concepts

This is a 2 part-series post. In part 1 I’ll be talking about a few key concepts that you should know when creating a .NET template.
Read more →

How to configure your custom roslyn analyzer using an .editorconfig file

Roslyn Analyzers are extensions that analyze source code and report violations. Some analyzers are built-into VS and some are third party ones which can be installed (like StyleCopyAnalyzers, FxCopAnalyzers, etc.). On today’s post I will show you how you can configure your custom roslyn analyzers with an .editorconfig file.
Read more →

How to centrally manage NuGet package versions within your solution

In this post I want to show you some of the different options available when you want to centrally manage NuGet versions within a solution.
Read more →

Why and how you should add a healthcheck endpoint to your Wcf legacy applications

What I wanted to talk in these post is how easy is to add a healthcheck endpoint in a WCF application, and how you can use it in case you want to move the application into the Cloud in the near future.
Read more →

Enforce the use of a specific .NET Core version using Roslyn

In these past few years Microsoft has kept a steady flow of new .NET Core versions, and if you have hundreds of applications in your company it’s almost impossible to keep them updated to the most recent version of the framework. If you want to enforce that everyone on your company is using the correct framework version when they create a new application you can use a Roslyn Analyzer.
Read more →