I learned a new thing in C#, so it’s time to write a (small) blog again. This time it is about starting other programs. Starting an executable Sometimes, you need to start an external executable on your server. This can be a PowerShell script, some Python code, or an .exe file. Let’s not dwell on…
Category: .NET Core
Monthly learnings from C# (April 2023)
I’m alive! There are no great things I’ve learned or need to remember for a while, but I decided that collecting the small things is also worthwhile. So, here are several things I learned about the last month. .ToLookup() Sometimes, you have a big list of Things. A Thing, for example, has the properties Id,…
Unit testing file input
Unit tests are mandatory for any business logic. But what if your business logic is parsing and processing files? Then you will need files as input in your tests. At first, I thought about making an extra wrapper around reading the file and mocking the wrapper when parsing it. However, sometimes this is more complicated…
.NET Core Authorizations with Active Directory
Some things sound too easy to do, but still end up eating a lot of time researching how to do it. Recently I made a small Web Application that had to integrate with Active Directory. To be precise: only a specific set of Active Directory groups is allowed to make use of the website functionality….
Upgrading to .NET Core (part 3): Using .NET Standard in an existing .NET Framework project
So, you’ve got .NET Core, .NET Standard and .NET Framework. Microsoft, when developing all this, had the brilliant idea to create a set of APIs that should be available on both Framework and Core. A Standard set, if you will. Thus, .NET Standard was born. Libraries targeting this “platform” (which technically is not really a…
Upgrading to .NET Core (part 2): why?
Why would you upgrade to .NET Core anyway? It’s not trivial, you will lose some functionality that are available in .NET Framework and .NET Core is moving so fast right now that sometimes it feels like you can’t keep up anymore. For our situation there are a few advantages: .NET Core scales better Fast development…
Upgrading to .NET Core (part 1): The Beginning
As is tradition, any new project (for a given definition of new) will be surpassed by the technology it uses. The project I’m currently working on was originally targeted to run on .NET Framework, and is doing a good job at it. However, being a new project we also have to be ready to run…