If we committed something into a Git repository that should not be there, we could rewrite the history and make it look as it was never there.
I usually try to prevent rewriting the history, especially when I already pushed the changes. Then when we modify the past, everyone in the team needs to do some extra work to catch up.
If this is not a problem or the lesser evil, we can use the following steps to rewrite the Git history.
C# 11 introduced collection expressions (formerly known as list patterns) to .Net 7+. This little feature allows us to match lists by shape, not just by checking every position. Let us see how this can influence how we write checks.
Installing packages with Winget is usually a straightforward task. However, when it comes to PowerShell 7, we need a little additional option to get everything correctly set-up.
Renewing SSL certificates for applications we deploy with Octopus Deploy is a straightforward task. We can go to the certificate store, replace the old certificate with the new one and the next time we deploy the certificate is on the server. If we need to update the certificate for Octopus Deploy itself, we need to go through more hoops that are not as clear. Let us see what we need to do.
Packages get outdated in no time. Keeping your dependencies up to date is not only a good thing, but because of the many security issues also an important task. It is already a few years since I wrote about the little .NET helper libyear. While this tool is still under active development and does its job the same way as it did in 2019, it is time to see what new tools could help us to keep an eye on our dependencies.
A nice little helper I found is dotnet-outdated, that gives us a detailed list of our projects and the outdated packages.
There are a whole bunch of non-printable characters in ASCII like tabulator, end of medium or shift in that sometimes finds its way into a user input. This often happens when copy and pasting data from Microsoft Office.
We can find most of those special characters by copying the data from SQL Server Management Studio into Notepad++. A little visible indicator is all we need to find the special character and remove it. However, 0x00 represents NULL and has no visual indicator, what makes it uncatchable for our usual process.
Last week we got this exception that started an unprecedented hunt for a special character:
System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. at System.Xml.XmlConvert.VerifyCharData(String data, ExceptionType invCharExceptionType, ExceptionType invSurrogateExceptionType)
We checked, double-checked and triple-checked all the data and found nothing. We fixed a bunch of entries, but nothing changed. The exception kept showing up.
By default, ASP.NET validates the dependency injection container configuration at runtime. As a result, we only discover missing or misconfigured dependencies when the application runs. While this approach works, getting feedback at the build time would be a time saver.
As we moved from .Net Full Framework to .NET 6, we had to use the little hack of creating a AssemblyInfo.cs file and put this content into it to access the internal classes and methods from our test project:
With Windows 11 came a new context menu in the file explorer. What before was a one click action, now takes us two steps:
We right-click on the file to open the first context menu:
Now we need to click on "Show more options" to get the Windows 10 context menu:
So far, I accepted this extra step as the price to get all the other Windows 11 benefits. But as it turns out, this is unnecessary. We can get the old context menu back with a single entry in the registry.