Skip to main content

Posts

Visual Studio Solution Filters

As I do a lot of software audits for customer, I encounter a large variation of codebases, some really small; a few projects, some really big; hundreds of projects in one solution. The question is how can you avoid that Visual Studio becomes awfully slow when you have such a large solution? Enter Visual Studio Solution Filters… What are Visual Studio Solution Filters? Visual Studio Solution Filters allow you to selectively load a subset of the projects in a solution. Typically when working in a large solution you don’t need all projects. With a solution filter(.slnf) you can save a subset of projects that you want to load. How to create a Visual Studio Solution Filter?   Let’s share how to create a solution filter: Open Visual Studio . Click on the Open a project or solution option. In the file dialog, select the solution you want to load. Don’t forget to check the Do not load projects checkbox in the bottom of the dialog before hitting Open . T...

Let’s Learn .NET : F#

Let’s Learn .NET is a monthly series of beginner courses to teach the basics of the .NET ecosystem. The July edition covers the fundamentals of F# in 2 hours. If you want to get started with Functional Programming in F#, this is a good introduction to the language.

AD FS Help

ADFS is great as long as it works. But when you get into trouble, all the help you can find is welcome… While investigating an ADFS issue, I found the AD FS Help website : This website combines a list of of both online and offline tools that can help you configure, customize and troubleshoot your ADFS instance.

GraphQL HotChocolate 11 - Updated Application Insights monitoring

A few months ago, I blogged about integrating Application Insights in HotChocolate to monitor the executed GraphQL queries and mutations. In HotChocolate 11, the diagnostics system has been rewritten and the code I shared in that post no longer works.  Here is finally the updated post I promised on how to achieve this in HotChocolate 11. Creating our own DiagnosticEventListener Starting from HotChocolate 11, your diagnostic class should inherit from DiagnosticEventListener. We still inject the Application Insights TelemetryClient in the constructor: Remark: There seems to be a problem with dependency injection in HotChocolate 11. This problem was fixed in HotChocolate 12. I show you a workaround at the end of this article. In this class you need to override at least the ExecuteRequest method: To track the full lifetime of a request, we need to implement a class that implements the IActivityScope interface. In the constructor of this class, we put all our i...

dotnet monitor–Run as a sidecar in a Kubernetes cluster–Part 2

Last week I blogged about how you can run dotnet monitor as a sidecar in your Kubernetes cluster . Although the yaml file I shared worked on my local cluster (inside Minikube), it didn’t work when I tried to deploy it to AKS. Nothing happened when I tried to connect to the specified URL’s. To fix this I had to take multiple steps: First I had to explicitly set the ‘—urls’ argument inside the manifest: Now I was able to connect to the url but it still failed. When I took a look at the logs I noticed the following message: {"Timestamp":"2021-07-27T18:48:29.6522095Z","EventId":7,"LogLevel":"Information","Category":"Microsoft.Diagnostics.Tools.Monitor.ApiKeyAuthenticationHandler","Message":"MonitorApiKey was not authenticated. Failure message: API key authentication not configured.","State":{"Message":"MonitorApiKey was not authenticated. Failure message: A...

NDepend–DDD Rule

A few weeks ago I was contacted by Patrick Smacchia , the creator of NDepend , if I would check out the latest edition of their code quality tool. As I had an upcoming software audit assignment planned, I thought it would be a great occasion to see what NDepend brings to the table and how it can help me to improve my understanding of an unfamiliar codebase. NDepend offers a lot of rules that are evaluated against your code. These rules can help you identify all kind of issues in your code. If you want to learn more about this feature check out the following video:   All these rules are created using CQLinq(the code query language of NDepend) and can be customized to your needs (and the specificalities of your project). One rule that got my interest was the ‘ DDD -  ubiquitous language check ’. This rule allows you to check if the correct domain language terms are used. It is disabled by default(because it should be updated to reflect your domain language). Let’s see ...