.NET Core 2.0: Expression: [Recursive resource lookup bug]

When developing Azure Functions and targeting .NET Core 2.0 (or higher), you may run into an infinite recursion bug that prevents you from successfully building the Azure Function; worst of all is that it may happen at a seeming random time.

Assert Failure
Expression: [Recursive resource lookup bug]
Description: Infinite recursion during resource lookup within System.Private.CoreLib.  This may be a bug in System.Private.CoreLib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names.
Resource name: ArgumentNull_Generic

When you go looking for any related bugs/issues, you’ll find all of them resolved around the last quarter of 2019 with a note that it’s been fixed in .NET Core 2.0.3.

.NET Core 2.0.3 is a servicing update to .NET Core and it isn’t pushed through Windows Update – because reasons, I guess?

becauseFuckYouThatsWhy

The easiest way to get around this issue is to move from .Net Core 2.0.0 to .NET Core 2.0.3. The SDK can be found here and the Runtime can be found here.

After installing, all of your localisation will be clear-sailing without even a hint or a trace of infinite recursion at build-time from that point-forward.

Happy dev’ing! =]