The following functions are in error... And that's about it.

Fixing “The following functions are in error: Object reference not set to an instance of an object.” error in Azure Functions

Reading Time: 3 minutes. Let me start this article, by reminding everyone that Azure Functions are awesome, and you should use them despite some hiccups. Having said that, let’s fix some errors! In the beginning of September 2018, Microsoft started pushing out breaking changes to Azure Functions 2.x. They had announced this a full month in advance, so they expected everyone in the world to update their Azure Functions to avoid the functions from breaking. I guess, however, that in real life, a month is not that much. Me, […]

Azure Functions SDK 2.0 settings in accessed in C# code

How to access Azure Function App’s settings from C#?

Reading Time: 5 minutes. Different versions of Azure Functions have different ways to access the Azure Function settings. This is another little thing, that I always forget – so better document it somewhere! So, this post describes, how you can access the function’s Application/Environmental settings/variables from your C# code. Posts Related to “How to access Azure Function App’s settings from C#?”:SharePoint Localization – a (somewhat) comprehensive how-to!The Scary Anatomy of a Microsoft License FraudGetting Connect-MsolService (and other Azure Active Directory PowerShell cmdlets) to work

Mock Function call to force loading an assembly - how elegant!

New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

Reading Time: 2 minutes. There’s now a new version of the assembly Microsoft.IdentityModel.Clients.ActiveDirectory available – plenty of reasons to update right away! Let me offer you one hot take on the matter since the earlier 3.x -versions of the package had some issues. Why bother updating? In an earlier post I described an issue I had with Microsoft.IdentityModel.Clients.ActiveDirectory.Platform not getting copied during the build in a referencing project. In 3.17.0, which the developers published this month, they fixed the issue! The new package actually contains separate DLLs for different platforms. In […]

Mock Function call to force loading an assembly - how elegant!

A quick (and handy!) hack to force referenced assembly to getting copied to a project

Reading Time: 3 minutes. Visual Studio failing to copy a referenced assembly to a project in build might lead to surprising runtime errors. This post will explain one method of fixing these issues, using Microsoft.IdentityModel.Clients.ActiveDirectory as the example – as earlier versions of that assembly had this issue! Problem After build, you might get this kind of error: Could not load file or assembly ‘Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, […]

Sequence contains more than one element

Easiest way to debug Seed-method in EF Code-first migrations in Configuration.cs when running Update-Database

Reading Time: 4 minutes. This post describes the easiest way to debug the issues that may stop your Seed-method in Configuration.cs from going through. The solution here shows you, how you can get a little bit more information out of the process, without attaching the debugger (there’s another blog post for that!) Description Entity Framework’s code-first migration’s are a beautiful and easy way of managing database schema changes and populating some preliminary data there. Personally I also sometimes use the method for adding some enrichment to data or or […]