WSL2 with Ubuntu 20.04 step-by-step upgrade: getting started on Windows 10 May 2020 Update
Now that the Windows 10 May 2020 Update is finally available to everyone, without requiring to join the Windows Insiders program and install preview versions, it’s finally time to embrace WSL2.
WSL2 is the second iteration of the Windows Subsystem for Linux which finally allows running linux virtualized inside Windows. This new version brings real virtualization using a real linux kernel, but, compared to a traditional virtual machine, it runs on a lightweight hypervisor getting close to bare-metal performance.
This will also be used by Docker under the hood, boosting the start-up time and general performance of our containers. Sweet! Furthermore, with WSL2, VPN connections automatically propagate to linux correctly, which is great news when working from home.
So, let’s stop talking and get to update our Ubuntu 18.04 WSL environment to Ubuntu 20.04 running on WSL2.
How to test logging when using Microsoft.Extensions.Logging
Logs are a key element for diagnosing, monitoring or auditing the application’s behaviour, so if you are either a library author or you are developing an application, it is important to ensure that the right logs are generated.
Would it be nice if there was an easy solution to write tests for it? Let’s start a journey through the best approaches to tests logs when using Microsoft.Extensions.Logging.
Build a .NET library with GitHub Actions
GitHub Actions are a great free tool to have continuous integration of your opensource .NET library for free, directly into GitHub, saving you from setting up other tools and linking accounts. Setting it up can feel a daunting task but, if you follow this guide you are going to be able to set it up in 10 minutes!
Should I use global.json?
I often get asked if it is better to have a global.json in a .NET project (not necessarily .NET Core) to define a specific .NET Core SDK version and, unfortunately, if you need a short answer you will get from me the typical engineer answer: it depends! Here is the full answer so you can decide what suits best for your needs.
HttpClientLab
HttpClientLab turns the HttpClientFactory into a lab, so you can mock the HttpClient to write tests.
Compile Python 3.4 on Raspbian
Recently I had to install Python 3.4 on the Raspberry Pi, which is not part of the current distribution as it is based on Debian Wheezy which includes Python 3.2.3.
The following steps allow you to install Python 3.4 with pip and sqlite support, without messing with your other Python versions.
Fix Gradle warnings after Android Studio 1.3 update
Have you just updated Android Studio to version 1.3 Beta and have you found yourself overwhelmed by all the warnings in the Gradle files?