Use .NET Reflection with C# to call Private/Protected Methods

Some days ago I needed to write some tests for an old Windows Service. I was not authorized to make any changes in the Code of the Service (and its libraries), so in order to invoke some protected/private method I needed to use the reflection. What follows, is the code I used: nothing complicated, but … Continue reading Use .NET Reflection with C# to call Private/Protected Methods

Problem with Swashbuckle.AspNetCore.Swagger & .NET Core 3.1

Today I was working on a sample Asp.NET Core 3.1 WebAPI project I wrote some time ago which uses the library Swashbuckle.AspNetCore.Swagger. I opened Visual Studio and without taking too much care, I updated all the NuGet Dependecies. I forgot to not have toggled the option to use the pre-release version: first “error”. Anyway, I … Continue reading Problem with Swashbuckle.AspNetCore.Swagger & .NET Core 3.1

Porting .NET Core 2.x app to .NET Core 3.1

During the past week I needed to upgrade a small project based on .NET Core 2.x to the new .NET Core 3.1. I need to say that the overall process was not completely painless but in less than 1 hour I could compile and publish on Azure my solution. I had to do some changes … Continue reading Porting .NET Core 2.x app to .NET Core 3.1

Azure DevOps Pipeline vs. .NET Core 3.1

Yesterday I have updated the target of my personal projects to .NET Core 3.1 and immediately I had a problem with the continuous integration in DevOps: all my build failed with this error: “error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1.” Well, the problem seems to be that .NET Core … Continue reading Azure DevOps Pipeline vs. .NET Core 3.1