Yesterday, I found myself face-to-face with a rather peculiar phenomenon that managed to consume a good hour of my time. As is often the case, the solution turned out to be surprisingly simple. With the intention of documenting this for future reference (especially for my future self), I am writing this short blog post. What happened? A colleague of mine updated XUnit in our solution and merged it into our main branch. When I pulled the new code locally and tried to restore the NuGet packages...
Using SRTP-Active Patterns in F#
A few days ago, we embarked on the process of tidying up a particularly complex piece of code. It involved moving typical frontend code to the backend, as it was becoming too cumbersome and we felt more secure writing it in F# in the backend. (more on that in another blog post) After much of it was rewritten, we ran into a pattern matching construct that threatened to contain a lot of code duplication. To increase readability, we wanted to use an Active Pattern. The problem was that the...
Today’s random F# code: Result instead of exceptions
Today’s random F# code from our app is about using Results instead of using exceptions.
Do you often need to get some data from the database, but it’s not sure that the requested data exists? And you don’t like using exceptions for this because exceptions are for really unusual things? Then use a Result:
Querying data with the help of Result
Migrating NServiceBus from v5 to v6 – Injecting IMessageSession when using NServiceBus.Host
I’m on the way to migrating from NServiceBus v5 to v6, and currently using NServiceBus.Host. As changing everything at the same time would be too much risk, I decided to keep using NServiceBus.Host until the migration to v6 is completed. This post is only relevant if you’re using NServiceBus.Host to host your endpoint. NServiceBus.Host for v6 does not register the NServiceBus interfaces (e.g. IMessageSession) on the dependency injection container anymore. During startup of the...
Fixing Assembly BindingRedirects when using NServiceBus.Host
Are you using NServiceBus.Host and after updating some NuGet packages the endpoint refuses to start? Read on for the solution
Sketchnote: A romp through the basics of .NET code analyzers by Marta Ciesielska at flashcon 2016
Many thanks to for making this blog post possible.
Sketchnote: .NET on Linux by Jacob Reimers at flashcon 2016
Many thanks to for making this blog post possible.
Sketchnote: what is .NET Standard by Adam Ralph at flashcon 2016
Many thanks to for making this blog post possible.
Sketchnote: Rearchitect your code towards async/await by Daniel Marbach at flashcon 2016
Many thanks to for making this blog post possible.
Real World builds in .NET
How do you build your Visual Studio solution, verify your coding guidelines and execute tests? What steps do you take when adding a new project to your Visual Studio solution? Living in the past Let me summarize my past experience. I have tried several different approaches, all of them involved build scripts, and Visual Studio Project Templates or manual editing of *.csproj files. I don’t like any of the approaches. Why? I will show you some drawbacks of this kind of build definitions. Build...