This was a fun one! Suddenly, while running or debugging my ASP.NET Core 3.1 application, I started getting errors about missing assemblies, along the lines of “FileNotFoundException: Could not load file or assembly Microsoft.AspNetCore.Components.Forms”. These DLL files were not required a minute earlier – nor did requiring them really make…Continue reading Fixing unexpected Microsoft.AspNetCore package errors after a dependency update
Sometimes you’ll need the default identity for your ASP.NET Core application, but want to disable the registration of new users. Sounds pretty basic, right? However, there’s actually no easy switch you can just flip to enable or disable said functionality. I went through a lot of different articles and ideas…Continue reading How to disable “Register” action in ASP.NET Core?
Every now and then comes the need to write your console output to a log file. There’s a simple way to do this in .NET Framework, and quite a few online articles detailing a borderline one-liner on how to do achieve it: Adding a log file listener(s) by calling Debug.Listeners…Continue reading Adding Debug listeners to your console application fails in .NET Core
Welp – this was not a fun issue to run into! While nobody in this day and age should use Internet Explorer for any normal usage (occasional legacy scenarios aside), there are still some luddites who do (or whose IT department makes them to). This means it’s still useful, and…Continue reading IE11 fails to load a (server-side) Blazor web app
When you’re in your .NET Core project, it’s always easy: you just register your DbContext in ConfigureServices, and then inject it into whichever Page, View or Controller you might need it in. However, when you have another project or solution you’re working on and you’d still like to use the…Continue reading How to create a DbContext from just a connection string?
Just a quick piece of documentation, as this piece of code, has changed in different versions of .NET Core 3.0 so far a few times. Need to have things like this written down somewhere! UriHelper / NavigationManager with .NET Core 3.0 Both of these helper libraries do essentially the same…Continue reading How to use UriHelper or NavigationManager in .NET Core 3.0 & Blazor?
Blazor is a new (ish) framework for building web UIs with C#. It either uses SignalR to manage connections between your client-side and server-side code or even compiles directly to WebAssembly, in both cases cutting out the need to write any pesky JavaScript yourself – pretty neat, if you ask…Continue reading HttpClient in Blazor
Welp – just ran into this one, and as I expect others to encounter the same issue, I’d better document it right away! So in Blazor, I was crafting a simple component that’d display some data in a nice way. Being lazy and crafty, I thought I’d copy-paste some similar…Continue reading ‘__generated__Index.OnInitAsync()’: no suitable method found to override