Find if NDepend can improve your code quality On how you could improve internal quality with NDepend.
Clearing the nuget cache for a package Have you tried consuming a newer version of an internal nuget package before pushing the version to the package repository? I happen to do that sometimes. I'd expect the pipeline to have pushed the package, but it would have failed. Now, since nuget caches the response, it's not possible to
Build-time configuration for Blazor WebAssembly Apps using MS Build properties .NET Core in general has a nice configuration API that I've been fond of since .NET Core 1.x. But since Blazor WebAssembly apps run completely on the client, the configuration works a little differently that one might expect. The way configuration using appsettings.json works is that, a HTTP
Scripting your build tasks in C# using cake Cake is the C# counterpart of gulp.js – they're both task based. Except, we don't generally pipe things in cake. From their website: Cake (C# Make) is a cross-platform build automation system with a C# DSL for tasks such as compiling code, copying files and folders, running unit tests, compressing
You don't need IConfiguration outside Startup I'm writing this for those new to ASP.NET Core, based on what I see on StackOverflow. Most of what I've written here is already in the Docs, so check the links at the end of the post for detailed info. The ASP.NET Core Web Host Think of the
Producing and consuming infinite Tasks in C# Let's say we wanted to run this forever. private static async Task DoTheThing() { await Task.Delay(2000); await Console.Out.WriteLineAsync($"{DateTime.Now.Ticks}"); } Since it returns a task, we could generate an infinite number of tasks by yield-returning it from a loop: private static IEnumerable ProduceForever(CancellationToken cancel)
C# REPL using mono or dotnet-script Quite often, all I want to do is check if a single line of code does what I think it does.
Creating an Azure EventGrid Webhook in ASP.NET Core Azure EventGrid has first class support for Azure Functions, Azure Logic Apps, and Azure Automation. However, writing your own webhook in ASP.NET Core is a piece of cake and I'm going to show you how to do it (because I just wrote one yesterday 😬). Install the EventGrid Azure SDK
Generating PDFs from an ASP.NET Core app using a Node library Quick blogpost on converting HTML to PDF from an ASP.NET Core application using a Node library by Marc Bachmann called html-pdf. I've also setup a docker-based sample github repository if you just want to see the final thing. Create a new project Let's quickly create a new ASP.NET